diff --git a/Dockerfile b/Dockerfile index c6d3f8d..acf1940 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,37 +1,38 @@ # Build image FROM golang:1.15-alpine as build RUN apk add --update nodejs npm make g++ git RUN npm install -g less less-plugin-clean-css RUN go get -u github.com/go-bindata/go-bindata/... RUN mkdir -p /go/src/github.com/writefreely/writefreely WORKDIR /go/src/github.com/writefreely/writefreely COPY . . ENV GO111MODULE=on RUN make build \ && make ui RUN mkdir /stage && \ cp -R /go/bin \ /go/src/github.com/writefreely/writefreely/templates \ /go/src/github.com/writefreely/writefreely/static \ /go/src/github.com/writefreely/writefreely/pages \ /go/src/github.com/writefreely/writefreely/keys \ /go/src/github.com/writefreely/writefreely/cmd \ + ./locales \ /stage # Final image FROM alpine:3 RUN apk add --no-cache openssl ca-certificates COPY --from=build --chown=daemon:daemon /stage /go WORKDIR /go VOLUME /go/keys EXPOSE 8080 USER daemon ENTRYPOINT ["cmd/writefreely/writefreely"] diff --git a/app.go b/app.go index c2989cb..b03c824 100644 --- a/app.go +++ b/app.go @@ -1,939 +1,1078 @@ /* * Copyright © 2018-2021 Musing Studio LLC. * * This file is part of WriteFreely. * * WriteFreely is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, included * in the LICENSE file in this source code package. */ package writefreely import ( "crypto/tls" "database/sql" "fmt" "html/template" "io/ioutil" "net/http" "net/url" "os" "os/signal" "path/filepath" "regexp" "strings" "syscall" "time" + "encoding/json" "github.com/gorilla/mux" "github.com/gorilla/schema" "github.com/gorilla/sessions" "github.com/manifoldco/promptui" stripmd "github.com/writeas/go-strip-markdown/v2" "github.com/writeas/impart" "github.com/writeas/web-core/auth" "github.com/writeas/web-core/converter" "github.com/writeas/web-core/log" "github.com/writefreely/writefreely/author" "github.com/writefreely/writefreely/config" "github.com/writefreely/writefreely/key" "github.com/writefreely/writefreely/migrations" "github.com/writefreely/writefreely/page" "golang.org/x/crypto/acme/autocert" + "github.com/leonelquinteros/gotext" ) const ( staticDir = "static" assumedTitleLen = 80 postsPerPage = 10 serverSoftware = "WriteFreely" softwareURL = "https://writefreely.org" ) var ( debugging bool // Software version can be set from git env using -ldflags softwareVer = "0.13.2" // DEPRECATED VARS isSingleUser bool ) // App holds data and configuration for an individual WriteFreely instance. type App struct { router *mux.Router shttp *http.ServeMux db *datastore cfg *config.Config cfgFile string keys *key.Keychain sessionStore sessions.Store formDecoder *schema.Decoder updates *updatesCache + locales string + tr func (str string, ParamsToTranslate ...interface{}) interface{} timeline *localTimeline } // DB returns the App's datastore func (app *App) DB() *datastore { return app.db } // Router returns the App's router func (app *App) Router() *mux.Router { return app.router } // Config returns the App's current configuration. func (app *App) Config() *config.Config { return app.cfg } // SetConfig updates the App's Config to the given value. func (app *App) SetConfig(cfg *config.Config) { app.cfg = cfg } // SetKeys updates the App's Keychain to the given value. func (app *App) SetKeys(k *key.Keychain) { app.keys = k } func (app *App) SessionStore() sessions.Store { return app.sessionStore } func (app *App) SetSessionStore(s sessions.Store) { app.sessionStore = s } // Apper is the interface for getting data into and out of a WriteFreely // instance (or "App"). // // App returns the App for the current instance. // // LoadConfig reads an app configuration into the App, returning any error // encountered. // // SaveConfig persists the current App configuration. // // LoadKeys reads the App's encryption keys and loads them into its // key.Keychain. type Apper interface { App() *App LoadConfig() error SaveConfig(*config.Config) error LoadKeys() error + LoadLocales() error + ReqLog(r *http.Request, status int, timeSince time.Duration) string } // App returns the App func (app *App) App() *App { + //softwareVer = "0.13.1" + //softwareVer = os.Getenv("VERSION") return app } // LoadConfig loads and parses a config file. func (app *App) LoadConfig() error { log.Info("Loading %s configuration...", app.cfgFile) cfg, err := config.Load(app.cfgFile) if err != nil { log.Error("Unable to load configuration: %v", err) os.Exit(1) return err } app.cfg = cfg return nil } // SaveConfig saves the given Config to disk -- namely, to the App's cfgFile. func (app *App) SaveConfig(c *config.Config) error { return config.Save(c, app.cfgFile) } +// LoadLocales reads "json" locales file created from "po" locales. +func (app *App) LoadLocales() error { + var err error + log.Info("Reading %s locales...", app.cfg.App.Lang) + + //var setLang = localize(app.cfg.App.Lang) +// ###############################################################################3 +type translator interface {} + +app.tr = func(str string, ParamsToTranslate ...interface{}) interface{} { + //var str string + n := 1 + md := false + var res translator + var output []interface{} + var iString []interface{} + + setLang := gotext.NewLocale("./locales", app.cfg.App.Lang); + setLang.AddDomain("base"); + + for _, item := range ParamsToTranslate { + switch item.(type) { + case int: // n > 1 for plural + n = item.(int) + case bool: // true for apply markdown + md = item.(bool) + case []interface{}: // variables passed for combined translations + var s string + var arr []string + plural := false // true if passed variable needs to be pluralized + for _, vars := range item.([]interface{}) { + switch vars.(type) { + case bool: // true if passed variable needs to be pluralized + plural = vars.(bool) + case int: + iString = append(iString, vars.(int)) + case int64: + iString = append(iString, int(vars.(int64))) + case string: + s = vars.(string) + if(strings.Contains(s, ";")){ // links inside translation + var link [] string + for j:= 0; j<=strings.Count(s,";"); j++ { + link = append(link, strings.Split(s, ";")[j]) + } + if(plural == true){ + link[0] = setLang.GetN(link[0], link[0], 2) + }else{ + link[0] = setLang.Get(link[0]) + } + iString = append(iString, "[" + link[0] + "](" + link[1] + ")") + }else{ // simple string + if(plural == true){ + fmt.Println("PLURAL") + if(len(iString) == 0){ + iString = append(iString, setLang.GetN(s, s, 2)) + }else{ + iString = append(iString, setLang.GetN(s, s, 2)) + } + }else{ + if(len(iString) == 0){ + iString = append(iString, setLang.Get(s)) + }else{ + iString = append(iString, setLang.Get(s)) + } + } + } + case []string: // not used, templates don't support [] string type as function arguments + arr = vars.([]string) + iString = append(iString, "[" + arr[0] + "](" + arr[1] + ")") + } + output = iString + } + + default: + fmt.Println("invalid parameters") + } + } + + if(output != nil){ // if output for combined translations is not null + if(md == true){ + res = template.HTML(applyBasicMarkdown([]byte(setLang.Get(str, output...)))) + }else{ + res = setLang.Get(str, output...) + } + return res + } + if(md == true){ + res = template.HTML(applyBasicMarkdown([]byte(setLang.Get(str)))) + }else if(n > 1){ + res = setLang.GetN(str, str, n) + }else{ + res = setLang.Get(str) + } + + return res + +} + + //inputFile:= "eu_ES.json" + inputFile := "./static/js/"+app.cfg.App.Lang+".json" + file, err := ioutil.ReadFile(inputFile) + if err != nil { + log.Error(err.Error()) + os.Exit(1) + } + + var mfile map[string]interface{} + err = json.Unmarshal(file, &mfile) + + var res []byte + res, err = json.Marshal(mfile[app.cfg.App.Lang]) + if err != nil { + log.Error(err.Error()) + os.Exit(1) + } + app.locales = string(res) + return nil +} + // LoadKeys reads all needed keys from disk into the App. In order to use the // configured `Server.KeysParentDir`, you must call initKeyPaths(App) before // this. func (app *App) LoadKeys() error { var err error app.keys = &key.Keychain{} if debugging { log.Info(" %s", emailKeyPath) } executable, err := os.Executable() if err != nil { executable = "writefreely" } else { executable = filepath.Base(executable) } app.keys.EmailKey, err = ioutil.ReadFile(emailKeyPath) if err != nil { return err } if debugging { log.Info(" %s", cookieAuthKeyPath) } app.keys.CookieAuthKey, err = ioutil.ReadFile(cookieAuthKeyPath) if err != nil { return err } if debugging { log.Info(" %s", cookieKeyPath) } app.keys.CookieKey, err = ioutil.ReadFile(cookieKeyPath) if err != nil { return err } if debugging { log.Info(" %s", csrfKeyPath) } app.keys.CSRFKey, err = ioutil.ReadFile(csrfKeyPath) if err != nil { if os.IsNotExist(err) { log.Error(`Missing key: %s. Run this command to generate missing keys: %s keys generate `, csrfKeyPath, executable) } return err } return nil } func (app *App) ReqLog(r *http.Request, status int, timeSince time.Duration) string { return fmt.Sprintf("\"%s %s\" %d %s \"%s\"", r.Method, r.RequestURI, status, timeSince, r.UserAgent()) } // handleViewHome shows page at root path. It checks the configuration and // authentication state to show the correct page. func handleViewHome(app *App, w http.ResponseWriter, r *http.Request) error { if app.cfg.App.SingleUser { // Render blog index return handleViewCollection(app, w, r) } // Multi-user instance forceLanding := r.FormValue("landing") == "1" if !forceLanding { // Show correct page based on user auth status and configured landing path u := getUserSession(app, r) if app.cfg.App.Chorus { // This instance is focused on reading, so show Reader on home route if not // private or a private-instance user is logged in. if !app.cfg.App.Private || u != nil { return viewLocalTimeline(app, w, r) } } if u != nil { // User is logged in, so show the Pad return handleViewPad(app, w, r) } if app.cfg.App.Private { return viewLogin(app, w, r) } if land := app.cfg.App.LandingPath(); land != "/" { return impart.HTTPError{http.StatusFound, land} } } return handleViewLanding(app, w, r) } func handleViewLanding(app *App, w http.ResponseWriter, r *http.Request) error { forceLanding := r.FormValue("landing") == "1" p := struct { page.StaticPage *OAuthButtons Flashes []template.HTML Banner template.HTML Content template.HTML ForcedLanding bool }{ StaticPage: pageForReq(app, r), OAuthButtons: NewOAuthButtons(app.Config()), ForcedLanding: forceLanding, } banner, err := getLandingBanner(app) if err != nil { log.Error("unable to get landing banner: %v", err) return impart.HTTPError{http.StatusInternalServerError, fmt.Sprintf("Could not get banner: %v", err)} } p.Banner = template.HTML(applyMarkdown([]byte(banner.Content), "", app.cfg)) content, err := getLandingBody(app) if err != nil { log.Error("unable to get landing content: %v", err) return impart.HTTPError{http.StatusInternalServerError, fmt.Sprintf("Could not get content: %v", err)} } p.Content = template.HTML(applyMarkdown([]byte(content.Content), "", app.cfg)) // Get error messages session, err := app.sessionStore.Get(r, cookieName) if err != nil { // Ignore this log.Error("Unable to get session in handleViewHome; ignoring: %v", err) } flashes, _ := getSessionFlashes(app, w, r, session) for _, flash := range flashes { p.Flashes = append(p.Flashes, template.HTML(flash)) } // Show landing page return renderPage(w, "landing.tmpl", p) } func handleTemplatedPage(app *App, w http.ResponseWriter, r *http.Request, t *template.Template) error { p := struct { page.StaticPage ContentTitle string Content template.HTML + ExtraContent template.HTML PlainContent string Updated string + //BlogStats template.HTML AboutStats *InstanceStats }{ StaticPage: pageForReq(app, r), } if r.URL.Path == "/about" || r.URL.Path == "/privacy" { var c *instanceContent var err error if r.URL.Path == "/about" { c, err = getAboutPage(app) // Fetch stats p.AboutStats = &InstanceStats{} p.AboutStats.NumPosts, _ = app.db.GetTotalPosts() p.AboutStats.NumBlogs, _ = app.db.GetTotalCollections() } else { c, err = getPrivacyPage(app) } if err != nil { return err } p.ContentTitle = c.Title.String p.Content = template.HTML(applyMarkdown([]byte(c.Content), "", app.cfg)) + //p.ExtraContent = template.HTML(applyMarkdown([]byte(c.ExtraContent), "", app.cfg)) + //p.BlogStats = template.HTML(applyMarkdown([]byte(c.BlogStats), "", app.cfg)) p.PlainContent = shortPostDescription(stripmd.Strip(c.Content)) if !c.Updated.IsZero() { p.Updated = c.Updated.Format("January 2, 2006") } } // Serve templated page err := t.ExecuteTemplate(w, "base", p) if err != nil { log.Error("Unable to render page: %v", err) } return nil } func pageForReq(app *App, r *http.Request) page.StaticPage { p := page.StaticPage{ AppCfg: app.cfg.App, Path: r.URL.Path, Version: "v" + softwareVer, + Tr: app.tr, } // Use custom style, if file exists if _, err := os.Stat(filepath.Join(staticDir, "local", "custom.css")); err == nil { p.CustomCSS = true } // Add user information, if given var u *User accessToken := r.FormValue("t") if accessToken != "" { userID := app.db.GetUserID(accessToken) if userID != -1 { var err error u, err = app.db.GetUserByID(userID) if err == nil { p.Username = u.Username } } } else { u = getUserSession(app, r) if u != nil { p.Username = u.Username p.IsAdmin = u != nil && u.IsAdmin() p.CanInvite = canUserInvite(app.cfg, p.IsAdmin) } } p.CanViewReader = !app.cfg.App.Private || u != nil + p.Locales = app.locales + return p } var fileRegex = regexp.MustCompile("/([^/]*\\.[^/]*)$") // Initialize loads the app configuration and initializes templates, keys, // session, route handlers, and the database connection. func Initialize(apper Apper, debug bool) (*App, error) { debugging = debug apper.LoadConfig() + // Generate JSON format locales + apper.App().GenJsonFiles() + apper.LoadLocales() + // Load templates err := InitTemplates(apper.App().Config()) if err != nil { return nil, fmt.Errorf("load templates: %s", err) } // Load keys and set up session initKeyPaths(apper.App()) // TODO: find a better way to do this, since it's unneeded in all Apper implementations err = InitKeys(apper) if err != nil { return nil, fmt.Errorf("init keys: %s", err) } apper.App().InitUpdates() apper.App().InitSession() apper.App().InitDecoder() err = ConnectToDatabase(apper.App()) if err != nil { return nil, fmt.Errorf("connect to DB: %s", err) } initActivityPub(apper.App()) // Handle local timeline, if enabled if apper.App().cfg.App.LocalTimeline { log.Info("Initializing local timeline...") initLocalTimeline(apper.App()) } return apper.App(), nil } func Serve(app *App, r *mux.Router) { log.Info("Going to serve...") isSingleUser = app.cfg.App.SingleUser app.cfg.Server.Dev = debugging // Handle shutdown c := make(chan os.Signal, 2) signal.Notify(c, os.Interrupt, syscall.SIGTERM) go func() { <-c log.Info("Shutting down...") shutdown(app) log.Info("Done.") os.Exit(0) }() // Start gopher server if app.cfg.Server.GopherPort > 0 && !app.cfg.App.Private { go initGopher(app) } // Start web application server var bindAddress = app.cfg.Server.Bind if bindAddress == "" { bindAddress = "localhost" } var err error if app.cfg.IsSecureStandalone() { if app.cfg.Server.Autocert { m := &autocert.Manager{ Prompt: autocert.AcceptTOS, Cache: autocert.DirCache(app.cfg.Server.TLSCertPath), } host, err := url.Parse(app.cfg.App.Host) if err != nil { log.Error("[WARNING] Unable to parse configured host! %s", err) log.Error(`[WARNING] ALL hosts are allowed, which can open you to an attack where clients connect to a server by IP address and pretend to be asking for an incorrect host name, and cause you to reach the CA's rate limit for certificate requests. We recommend supplying a valid host name.`) log.Info("Using autocert on ANY host") } else { log.Info("Using autocert on host %s", host.Host) m.HostPolicy = autocert.HostWhitelist(host.Host) } s := &http.Server{ Addr: ":https", Handler: r, TLSConfig: &tls.Config{ GetCertificate: m.GetCertificate, }, } s.SetKeepAlivesEnabled(false) go func() { log.Info("Serving redirects on http://%s:80", bindAddress) err = http.ListenAndServe(":80", m.HTTPHandler(nil)) log.Error("Unable to start redirect server: %v", err) }() log.Info("Serving on https://%s:443", bindAddress) log.Info("---") err = s.ListenAndServeTLS("", "") } else { go func() { log.Info("Serving redirects on http://%s:80", bindAddress) err = http.ListenAndServe(fmt.Sprintf("%s:80", bindAddress), http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { http.Redirect(w, r, app.cfg.App.Host, http.StatusMovedPermanently) })) log.Error("Unable to start redirect server: %v", err) }() log.Info("Serving on https://%s:443", bindAddress) log.Info("Using manual certificates") log.Info("---") err = http.ListenAndServeTLS(fmt.Sprintf("%s:443", bindAddress), app.cfg.Server.TLSCertPath, app.cfg.Server.TLSKeyPath, r) } } else { log.Info("Serving on http://%s:%d\n", bindAddress, app.cfg.Server.Port) log.Info("---") err = http.ListenAndServe(fmt.Sprintf("%s:%d", bindAddress, app.cfg.Server.Port), r) } if err != nil { log.Error("Unable to start: %v", err) os.Exit(1) } } func (app *App) InitDecoder() { // TODO: do this at the package level, instead of the App level // Initialize modules app.formDecoder = schema.NewDecoder() app.formDecoder.RegisterConverter(converter.NullJSONString{}, converter.ConvertJSONNullString) app.formDecoder.RegisterConverter(converter.NullJSONBool{}, converter.ConvertJSONNullBool) app.formDecoder.RegisterConverter(sql.NullString{}, converter.ConvertSQLNullString) app.formDecoder.RegisterConverter(sql.NullBool{}, converter.ConvertSQLNullBool) app.formDecoder.RegisterConverter(sql.NullInt64{}, converter.ConvertSQLNullInt64) app.formDecoder.RegisterConverter(sql.NullFloat64{}, converter.ConvertSQLNullFloat64) } // ConnectToDatabase validates and connects to the configured database, then // tests the connection. func ConnectToDatabase(app *App) error { // Check database configuration if app.cfg.Database.Type == driverMySQL && (app.cfg.Database.User == "" || app.cfg.Database.Password == "") { return fmt.Errorf("Database user or password not set.") } if app.cfg.Database.Host == "" { app.cfg.Database.Host = "localhost" } if app.cfg.Database.Database == "" { app.cfg.Database.Database = "writefreely" } // TODO: check err connectToDatabase(app) // Test database connection err := app.db.Ping() if err != nil { return fmt.Errorf("Database ping failed: %s", err) } return nil } // FormatVersion constructs the version string for the application func FormatVersion() string { return serverSoftware + " " + softwareVer } // OutputVersion prints out the version of the application. func OutputVersion() { fmt.Println(FormatVersion()) } // NewApp creates a new app instance. func NewApp(cfgFile string) *App { return &App{ cfgFile: cfgFile, } } // CreateConfig creates a default configuration and saves it to the app's cfgFile. func CreateConfig(app *App) error { log.Info("Creating configuration...") c := config.New() log.Info("Saving configuration %s...", app.cfgFile) err := config.Save(c, app.cfgFile) if err != nil { return fmt.Errorf("Unable to save configuration: %v", err) } return nil } // DoConfig runs the interactive configuration process. func DoConfig(app *App, configSections string) { if configSections == "" { configSections = "server db app" } // let's check there aren't any garbage in the list configSectionsArray := strings.Split(configSections, " ") for _, element := range configSectionsArray { if element != "server" && element != "db" && element != "app" { log.Error("Invalid argument to --sections. Valid arguments are only \"server\", \"db\" and \"app\"") os.Exit(1) } } d, err := config.Configure(app.cfgFile, configSections) if err != nil { log.Error("Unable to configure: %v", err) os.Exit(1) } app.cfg = d.Config connectToDatabase(app) defer shutdown(app) if !app.db.DatabaseInitialized() { err = adminInitDatabase(app) if err != nil { log.Error(err.Error()) os.Exit(1) } } else { log.Info("Database already initialized.") } if d.User != nil { u := &User{ Username: d.User.Username, HashedPass: d.User.HashedPass, Created: time.Now().Truncate(time.Second).UTC(), } // Create blog log.Info("Creating user %s...\n", u.Username) err = app.db.CreateUser(app.cfg, u, app.cfg.App.SiteName, "") if err != nil { log.Error("Unable to create user: %s", err) os.Exit(1) } log.Info("Done!") } os.Exit(0) } // GenerateKeyFiles creates app encryption keys and saves them into the configured KeysParentDir. func GenerateKeyFiles(app *App) error { // Read keys path from config app.LoadConfig() // Create keys dir if it doesn't exist yet fullKeysDir := filepath.Join(app.cfg.Server.KeysParentDir, keysDir) if _, err := os.Stat(fullKeysDir); os.IsNotExist(err) { err = os.Mkdir(fullKeysDir, 0700) if err != nil { return err } } // Generate keys initKeyPaths(app) // TODO: use something like https://github.com/hashicorp/go-multierror to return errors var keyErrs error err := generateKey(emailKeyPath) if err != nil { keyErrs = err } err = generateKey(cookieAuthKeyPath) if err != nil { keyErrs = err } err = generateKey(cookieKeyPath) if err != nil { keyErrs = err } err = generateKey(csrfKeyPath) if err != nil { keyErrs = err } return keyErrs } // CreateSchema creates all database tables needed for the application. func CreateSchema(apper Apper) error { apper.LoadConfig() connectToDatabase(apper.App()) defer shutdown(apper.App()) err := adminInitDatabase(apper.App()) if err != nil { return err } return nil } // Migrate runs all necessary database migrations. func Migrate(apper Apper) error { apper.LoadConfig() connectToDatabase(apper.App()) defer shutdown(apper.App()) err := migrations.Migrate(migrations.NewDatastore(apper.App().db.DB, apper.App().db.driverName)) if err != nil { return fmt.Errorf("migrate: %s", err) } return nil } // ResetPassword runs the interactive password reset process. func ResetPassword(apper Apper, username string) error { // Connect to the database apper.LoadConfig() connectToDatabase(apper.App()) defer shutdown(apper.App()) // Fetch user u, err := apper.App().db.GetUserForAuth(username) if err != nil { log.Error("Get user: %s", err) os.Exit(1) } // Prompt for new password prompt := promptui.Prompt{ Templates: &promptui.PromptTemplates{ Success: "{{ . | bold | faint }}: ", }, Label: "New password", Mask: '*', } newPass, err := prompt.Run() if err != nil { log.Error("%s", err) os.Exit(1) } // Do the update log.Info("Updating...") err = adminResetPassword(apper.App(), u, newPass) if err != nil { log.Error("%s", err) os.Exit(1) } log.Info("Success.") return nil } // DoDeleteAccount runs the confirmation and account delete process. func DoDeleteAccount(apper Apper, username string) error { // Connect to the database apper.LoadConfig() connectToDatabase(apper.App()) defer shutdown(apper.App()) // check user exists u, err := apper.App().db.GetUserForAuth(username) if err != nil { log.Error("%s", err) os.Exit(1) } userID := u.ID // do not delete the admin account // TODO: check for other admins and skip? if u.IsAdmin() { log.Error("Can not delete admin account") os.Exit(1) } // confirm deletion, w/ w/out posts prompt := promptui.Prompt{ Templates: &promptui.PromptTemplates{ Success: "{{ . | bold | faint }}: ", }, Label: fmt.Sprintf("Really delete user : %s", username), IsConfirm: true, } _, err = prompt.Run() if err != nil { log.Info("Aborted...") os.Exit(0) } log.Info("Deleting...") err = apper.App().db.DeleteAccount(userID) if err != nil { log.Error("%s", err) os.Exit(1) } log.Info("Success.") return nil } func connectToDatabase(app *App) { log.Info("Connecting to %s database...", app.cfg.Database.Type) var db *sql.DB var err error if app.cfg.Database.Type == driverMySQL { db, err = sql.Open(app.cfg.Database.Type, fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?charset=utf8mb4&parseTime=true&loc=%s&tls=%t", app.cfg.Database.User, app.cfg.Database.Password, app.cfg.Database.Host, app.cfg.Database.Port, app.cfg.Database.Database, url.QueryEscape(time.Local.String()), app.cfg.Database.TLS)) db.SetMaxOpenConns(50) } else if app.cfg.Database.Type == driverSQLite { if !SQLiteEnabled { log.Error("Invalid database type '%s'. Binary wasn't compiled with SQLite3 support.", app.cfg.Database.Type) os.Exit(1) } if app.cfg.Database.FileName == "" { log.Error("SQLite database filename value in config.ini is empty.") os.Exit(1) } db, err = sql.Open("sqlite3_with_regex", app.cfg.Database.FileName+"?parseTime=true&cached=shared") db.SetMaxOpenConns(2) } else { log.Error("Invalid database type '%s'. Only 'mysql' and 'sqlite3' are supported right now.", app.cfg.Database.Type) os.Exit(1) } if err != nil { log.Error("%s", err) os.Exit(1) } app.db = &datastore{db, app.cfg.Database.Type} } func shutdown(app *App) { log.Info("Closing database connection...") app.db.Close() } // CreateUser creates a new admin or normal user from the given credentials. func CreateUser(apper Apper, username, password string, isAdmin bool) error { // Create an admin user with --create-admin apper.LoadConfig() connectToDatabase(apper.App()) defer shutdown(apper.App()) // Ensure an admin / first user doesn't already exist firstUser, _ := apper.App().db.GetUserByID(1) if isAdmin { // Abort if trying to create admin user, but one already exists if firstUser != nil { return fmt.Errorf("Admin user already exists (%s). Create a regular user with: writefreely --create-user", firstUser.Username) } } else { // Abort if trying to create regular user, but no admin exists yet if firstUser == nil { return fmt.Errorf("No admin user exists yet. Create an admin first with: writefreely --create-admin") } } // Create the user // Normalize and validate username desiredUsername := username username = getSlug(username, "") usernameDesc := username if username != desiredUsername { usernameDesc += " (originally: " + desiredUsername + ")" } if !author.IsValidUsername(apper.App().cfg, username) { return fmt.Errorf("Username %s is invalid, reserved, or shorter than configured minimum length (%d characters).", usernameDesc, apper.App().cfg.App.MinUsernameLen) } // Hash the password hashedPass, err := auth.HashPass([]byte(password)) if err != nil { return fmt.Errorf("Unable to hash password: %v", err) } u := &User{ Username: username, HashedPass: hashedPass, Created: time.Now().Truncate(time.Second).UTC(), } userType := "user" if isAdmin { userType = "admin" } log.Info("Creating %s %s...", userType, usernameDesc) err = apper.App().db.CreateUser(apper.App().Config(), u, desiredUsername, "") if err != nil { return fmt.Errorf("Unable to create user: %s", err) } log.Info("Done!") return nil } func adminInitDatabase(app *App) error { schemaFileName := "schema.sql" if app.cfg.Database.Type == driverSQLite { schemaFileName = "sqlite.sql" } schema, err := Asset(schemaFileName) if err != nil { return fmt.Errorf("Unable to load schema file: %v", err) } tblReg := regexp.MustCompile("CREATE TABLE (IF NOT EXISTS )?`([a-z_]+)`") queries := strings.Split(string(schema), ";\n") for _, q := range queries { if strings.TrimSpace(q) == "" { continue } parts := tblReg.FindStringSubmatch(q) if len(parts) >= 3 { log.Info("Creating table %s...", parts[2]) } else { log.Info("Creating table ??? (Weird query) No match in: %v", parts) } _, err = app.db.Exec(q) if err != nil { log.Error("%s", err) } else { log.Info("Created.") } } // Set up migrations table log.Info("Initializing appmigrations table...") err = migrations.SetInitialMigrations(migrations.NewDatastore(app.db.DB, app.db.driverName)) if err != nil { return fmt.Errorf("Unable to set initial migrations: %v", err) } log.Info("Running migrations...") err = migrations.Migrate(migrations.NewDatastore(app.db.DB, app.db.driverName)) if err != nil { return fmt.Errorf("migrate: %s", err) } log.Info("Done.") return nil } // ServerUserAgent returns a User-Agent string to use in external requests. The // hostName parameter may be left empty. func ServerUserAgent(hostName string) string { hostUAStr := "" if hostName != "" { hostUAStr = "; +" + hostName } return "Go (" + serverSoftware + "/" + softwareVer + hostUAStr + ")" } diff --git a/config/config.go b/config/config.go index 2065ddf..833de4c 100644 --- a/config/config.go +++ b/config/config.go @@ -1,295 +1,296 @@ /* * Copyright © 2018-2021 Musing Studio LLC. * * This file is part of WriteFreely. * * WriteFreely is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, included * in the LICENSE file in this source code package. */ // Package config holds and assists in the configuration of a writefreely instance. package config import ( "net/url" "strings" "github.com/go-ini/ini" "github.com/writeas/web-core/log" "golang.org/x/net/idna" ) const ( // FileName is the default configuration file name FileName = "config.ini" UserNormal UserType = "user" UserAdmin = "admin" ) type ( UserType string // ServerCfg holds values that affect how the HTTP server runs ServerCfg struct { HiddenHost string `ini:"hidden_host"` Port int `ini:"port"` Bind string `ini:"bind"` TLSCertPath string `ini:"tls_cert_path"` TLSKeyPath string `ini:"tls_key_path"` Autocert bool `ini:"autocert"` TemplatesParentDir string `ini:"templates_parent_dir"` StaticParentDir string `ini:"static_parent_dir"` PagesParentDir string `ini:"pages_parent_dir"` KeysParentDir string `ini:"keys_parent_dir"` HashSeed string `ini:"hash_seed"` GopherPort int `ini:"gopher_port"` Dev bool `ini:"-"` } // DatabaseCfg holds values that determine how the application connects to a datastore DatabaseCfg struct { Type string `ini:"type"` FileName string `ini:"filename"` User string `ini:"username"` Password string `ini:"password"` Database string `ini:"database"` Host string `ini:"host"` Port int `ini:"port"` TLS bool `ini:"tls"` } WriteAsOauthCfg struct { ClientID string `ini:"client_id"` ClientSecret string `ini:"client_secret"` AuthLocation string `ini:"auth_location"` TokenLocation string `ini:"token_location"` InspectLocation string `ini:"inspect_location"` CallbackProxy string `ini:"callback_proxy"` CallbackProxyAPI string `ini:"callback_proxy_api"` } GitlabOauthCfg struct { ClientID string `ini:"client_id"` ClientSecret string `ini:"client_secret"` Host string `ini:"host"` DisplayName string `ini:"display_name"` CallbackProxy string `ini:"callback_proxy"` CallbackProxyAPI string `ini:"callback_proxy_api"` } GiteaOauthCfg struct { ClientID string `ini:"client_id"` ClientSecret string `ini:"client_secret"` Host string `ini:"host"` DisplayName string `ini:"display_name"` CallbackProxy string `ini:"callback_proxy"` CallbackProxyAPI string `ini:"callback_proxy_api"` } SlackOauthCfg struct { ClientID string `ini:"client_id"` ClientSecret string `ini:"client_secret"` TeamID string `ini:"team_id"` CallbackProxy string `ini:"callback_proxy"` CallbackProxyAPI string `ini:"callback_proxy_api"` } GenericOauthCfg struct { ClientID string `ini:"client_id"` ClientSecret string `ini:"client_secret"` Host string `ini:"host"` DisplayName string `ini:"display_name"` CallbackProxy string `ini:"callback_proxy"` CallbackProxyAPI string `ini:"callback_proxy_api"` TokenEndpoint string `ini:"token_endpoint"` InspectEndpoint string `ini:"inspect_endpoint"` AuthEndpoint string `ini:"auth_endpoint"` Scope string `ini:"scope"` AllowDisconnect bool `ini:"allow_disconnect"` MapUserID string `ini:"map_user_id"` MapUsername string `ini:"map_username"` MapDisplayName string `ini:"map_display_name"` MapEmail string `ini:"map_email"` } // AppCfg holds values that affect how the application functions AppCfg struct { SiteName string `ini:"site_name"` SiteDesc string `ini:"site_description"` Host string `ini:"host"` + Lang string `ini:"language"` // Site appearance Theme string `ini:"theme"` Editor string `ini:"editor"` JSDisabled bool `ini:"disable_js"` WebFonts bool `ini:"webfonts"` Landing string `ini:"landing"` SimpleNav bool `ini:"simple_nav"` WFModesty bool `ini:"wf_modesty"` // Site functionality Chorus bool `ini:"chorus"` Forest bool `ini:"forest"` // The admin cares about the forest, not the trees. Hide unnecessary technical info. DisableDrafts bool `ini:"disable_drafts"` // Users SingleUser bool `ini:"single_user"` OpenRegistration bool `ini:"open_registration"` OpenDeletion bool `ini:"open_deletion"` MinUsernameLen int `ini:"min_username_len"` MaxBlogs int `ini:"max_blogs"` // Options for public instances // Federation Federation bool `ini:"federation"` PublicStats bool `ini:"public_stats"` Monetization bool `ini:"monetization"` NotesOnly bool `ini:"notes_only"` // Access Private bool `ini:"private"` // Additional functions LocalTimeline bool `ini:"local_timeline"` UserInvites string `ini:"user_invites"` // Defaults DefaultVisibility string `ini:"default_visibility"` // Check for Updates UpdateChecks bool `ini:"update_checks"` // Disable password authentication if use only Oauth DisablePasswordAuth bool `ini:"disable_password_auth"` } // Config holds the complete configuration for running a writefreely instance Config struct { Server ServerCfg `ini:"server"` Database DatabaseCfg `ini:"database"` App AppCfg `ini:"app"` SlackOauth SlackOauthCfg `ini:"oauth.slack"` WriteAsOauth WriteAsOauthCfg `ini:"oauth.writeas"` GitlabOauth GitlabOauthCfg `ini:"oauth.gitlab"` GiteaOauth GiteaOauthCfg `ini:"oauth.gitea"` GenericOauth GenericOauthCfg `ini:"oauth.generic"` } ) // New creates a new Config with sane defaults func New() *Config { c := &Config{ Server: ServerCfg{ Port: 8080, Bind: "localhost", /* IPV6 support when not using localhost? */ }, App: AppCfg{ Host: "http://localhost:8080", Theme: "write", WebFonts: true, SingleUser: true, MinUsernameLen: 3, MaxBlogs: 1, Federation: true, PublicStats: true, }, } c.UseMySQL(true) return c } // UseMySQL resets the Config's Database to use default values for a MySQL setup. func (cfg *Config) UseMySQL(fresh bool) { cfg.Database.Type = "mysql" if fresh { cfg.Database.Host = "localhost" cfg.Database.Port = 3306 } } // UseSQLite resets the Config's Database to use default values for a SQLite setup. func (cfg *Config) UseSQLite(fresh bool) { cfg.Database.Type = "sqlite3" if fresh { cfg.Database.FileName = "writefreely.db" } } // IsSecureStandalone returns whether or not the application is running as a // standalone server with TLS enabled. func (cfg *Config) IsSecureStandalone() bool { return cfg.Server.Port == 443 && cfg.Server.TLSCertPath != "" && cfg.Server.TLSKeyPath != "" } func (ac *AppCfg) LandingPath() string { if !strings.HasPrefix(ac.Landing, "/") { return "/" + ac.Landing } return ac.Landing } func (ac AppCfg) SignupPath() string { if !ac.OpenRegistration { return "" } if ac.Chorus || ac.Private || (ac.Landing != "" && ac.Landing != "/") { return "/signup" } return "/" } // Load reads the given configuration file, then parses and returns it as a Config. func Load(fname string) (*Config, error) { if fname == "" { fname = FileName } cfg, err := ini.Load(fname) if err != nil { return nil, err } // Parse INI file uc := &Config{} err = cfg.MapTo(uc) if err != nil { return nil, err } // Do any transformations u, err := url.Parse(uc.App.Host) if err != nil { return nil, err } d, err := idna.ToASCII(u.Hostname()) if err != nil { log.Error("idna.ToASCII for %s: %s", u.Hostname(), err) return nil, err } uc.App.Host = u.Scheme + "://" + d if u.Port() != "" { uc.App.Host += ":" + u.Port() } return uc, nil } // Save writes the given Config to the given file. func Save(uc *Config, fname string) error { cfg := ini.Empty() err := ini.ReflectFrom(cfg, uc) if err != nil { return err } if fname == "" { fname = FileName } return cfg.SaveTo(fname) } diff --git a/less/core.less b/less/core.less index 709ba1e..792cdec 100644 --- a/less/core.less +++ b/less/core.less @@ -1,1621 +1,1622 @@ body { font-family: @serifFont; font-size-adjust: 0.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; background-color: white; color: #111; h1, header h2 { a { color: @headerTextColor; .transition-duration(0.2s); &:hover { color: #303030; text-decoration: none; } } } h1, h2, h3 { line-height: 1.2; } &#post article, &#collection article p, &#subpage article p { display: block; unicode-bidi: embed; white-space: pre; } &#post { #wrapper, pre { max-width: 40em; margin: 0 auto; a:hover { text-decoration: underline; } } blockquote { p + p { margin: -2em 0 0.5em; } } article { margin-bottom: 2em !important; h1, h2, h3, h4, h5, h6, p, ul, ol, code { display: inline; margin: 0; } hr + p, ol, ul { display: block; margin-top: -1rem; margin-bottom: -1rem; } ol, ul { margin: 2rem 0 -1rem; ol, ul { margin: 1.25rem 0 -0.5rem; } } li { margin-top: -0.5rem; margin-bottom: -0.5rem; } h2#title { .article-title; } h1 { font-size: 1.5em; } h2 { font-size: 1.4em; } } header { nav { span, a { &.pinned { &.selected { font-weight: bold; } &+.views { margin-left: 2em; } } } } } .owner-visible { display: none; } } &#post, &#collection, &#subpage { code { .article-code; } img, video, audio { max-width: 100%; } audio { width: 100%; white-space: initial; } pre { .code-block; code { background: transparent; border: 0; padding: 0; font-size: 1em; white-space: pre-wrap; /* CSS 3 */ white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ word-wrap: break-word; /* Internet Explorer 5.5+ */ } } blockquote { .article-blockquote; } article { hr { margin-top: 0; margin-bottom: 0; } p.badge { background-color: #aaa; display: inline-block; padding: 0.25em 0.5em; margin: 0; float: right; color: white; .rounded(.25em); } } header { nav { span, a { &.pinned { &+.pinned { margin-left: 1.5em; } } } } } footer { nav { a { margin-top: 0; } } } } &#collection { #welcome, .access { margin: 0 auto; max-width: 35em; h2 { font-weight: normal; margin-bottom: 1em; } p { font-size: 1.2em; line-height: 1.6; } } .access { margin: 8em auto; text-align: center; h2, ul.errors { font-size: 1.2em; margin-bottom: 1.5em !important; } } header { padding: 0 1em; text-align: center; max-width: 50em; margin: 3em auto 4em; .writeas-prefix { a { color: #aaa; } display: block; margin-bottom: 0.5em; } nav { display: block; margin: 1em 0; a:first-child { margin: 0; } } } nav#manage { position: absolute; top: 1em; left: 1.5em; li a.write { font-family: @serifFont; padding-top: 0.2em; padding-bottom: 0.2em; } } pre { line-height: 1.5; } } &#subpage { #wrapper { h1 { font-size: 2.5em; letter-spacing: -2px; padding: 0 2rem 2rem; } } } &#post { pre { font-size: 0.75em; } } &#collection, &#subpage { #wrapper { margin-left: auto; margin-right: auto; article { margin-bottom: 4em; &:hover { .hidden { .opacity(1); } } } h2 { margin-top: 0em; margin-bottom: 0.25em; &+time { display: block; margin-top: 0.25em; margin-bottom: 0.25em; } } time { font-size: 1.1em; &+p { margin-top: 0.25em; } } footer { text-align: left; padding: 0; } } #paging { overflow: visible; padding: 1em 6em 0; } a.read-more { color: #666; } } &#me #official-writing { h2 { font-weight: normal; a { font-size: 0.6em; margin-left: 1em; } a[name] { margin-left: 0; } a:link, a:visited { color: @textLinkColor; } a:hover { text-decoration: underline; } } } &#promo { div.heading { margin: 8em 0; } div.heading, div.attention-form { h1 { font-size: 3.5em; } input { padding-left: 0.75em; padding-right: 0.75em; &[type=email] { max-width: 16em; } &[type=submit] { padding-left: 1.5em; padding-right: 1.5em; } } } h2 { margin-bottom: 0; font-size: 1.8em; font-weight: normal; span.write-as { color: black; } &.soon { color: lighten(@subheaders, 50%); span { &.write-as { color: lighten(#000, 50%); } &.note { color: lighten(#333, 50%); font-variant: small-caps; margin-left: 0.5em; } } } } .half-col a { margin-left: 1em; margin-right: 1em; } } nav#top-nav { display: inline; position: absolute; top: 1.5em; right: 1.5em; font-size: 0.95rem; font-family: @sansFont; text-transform: uppercase; a { color: #777; } a + a { margin-left: 1em; } } footer { nav, ul { a { display: inline-block; margin-top: 0.8em; + text-transform: lowercase; .transition-duration(0.1s); text-decoration: none; + a { margin-left: 0.8em; } &:link, &:visited { color: #999; } &:hover { color: #666; text-decoration: none; } } } a.home { &:link, &:visited { color: #333; } font-weight: bold; text-decoration: none; &:hover { color: #000; } } ul { list-style: none; text-align: left; padding-left: 0 !important; margin-left: 0 !important; .icons img { height: 16px; width: 16px; fill: #999; } } } } img { &.paid { height: 0.86em; vertical-align: middle; margin-bottom: 0.1em; } } nav#full-nav { margin: 0; .left-side { display: inline-block; a:first-child { margin-left: 0; } } .right-side { float: right; } } nav#full-nav a.simple-btn, .tool button { font-family: @sansFont; border: 1px solid #ccc !important; padding: .5rem 1rem; margin: 0; .rounded(.25em); text-decoration: none; } .post-title { a { &:link { color: #333; } &:visited { color: #444; } } time, time a:link, time a:visited, &+.time { color: #999; } } .hidden { -moz-transition-property: opacity; -webkit-transition-property: opacity; -o-transition-property: opacity; transition-property: opacity; .transition-duration(0.4s); .opacity(0); } a { text-decoration: none; &:hover { text-decoration: underline; } &.subdued { color: #999; &:hover { border-bottom: 1px solid #999; text-decoration: none; } } &.danger { color: @dangerCol; font-size: 0.86em; } &.simple-cta { text-decoration: none; border-bottom: 1px solid #ccc; color: #333; padding-bottom: 2px; &:hover { text-decoration: none; } } &.action-btn { font-family: @sansFont; text-transform: uppercase; .rounded(.25em); background-color: red; color: white; font-weight: bold; padding: 0.5em 0.75em; &:hover { background-color: lighten(#f00, 5%); text-decoration: none; } } &.hashtag:hover { text-decoration: none; span + span { text-decoration: underline; } } &.hashtag { span:first-child { color: #999; margin-right: 0.1em; font-size: 0.86em; text-decoration: none; } } } abbr { border-bottom: 1px dotted #999; text-decoration: none; cursor: help; } body#collection article p, body#subpage article p { .article-p; } pre, body#post article, #post .alert, #subpage .alert, body#collection article, body#subpage article, body#subpage #wrapper h1 { max-width: 40rem; margin: 0 auto; } #collection header .alert, #post .alert, #subpage .alert { margin-bottom: 1em; p { text-align: left; line-height: 1.5; } } textarea, input#title, pre, body#post article, body#collection article p { &.norm, &.sans, &.wrap { line-height: 1.5; white-space: pre-wrap; /* CSS 3 */ white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ word-wrap: break-word; /* Internet Explorer 5.5+ */ } } textarea, input#title, pre, body#post article, body#collection article, body#subpage article, span, .font { &.norm { font-family: @serifFont; } &.sans { font-family: @sansFont; } &.mono, &.wrap, &.code { font-family: @monoFont; } &.mono, &.code { max-width: none !important; } } textarea { &.section { border: 1px solid #ccc; padding: 0.65em 0.75em; .rounded(.25em); &.codable { height: 12em; resize: vertical; } } } .ace_editor { height: 12em; border: 1px solid #333; max-width: initial; width: 100%; font-size: 0.86em !important; border: 1px solid #ccc; padding: 0.65em 0.75em; margin: 0; .rounded(.25em); } p { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; &.intro { font-size: 1.25em; text-align: center; } &.upgrade-prompt { font-size: 0.9em; color: #444; } &.text-cta { font-size: 1.2em; text-align: center; margin-bottom: 0.5em; &+ p { text-align: center; font-size: 0.7em; margin-top: 0; color: #666; } } &.error { font-style: italic; color: @errUrgentCol; } &.headeresque { font-size: 2em; } } table.classy { width: 95%; border-collapse: collapse; margin-bottom: 2em; tr + tr { border-top: 1px solid #ccc; } th { text-transform: uppercase; font-weight: normal; font-size: 95%; font-family: @sansFont; padding: 1rem 0.75rem; text-align: center; } td { height: 3.5rem; } p { margin-top: 0 !important; margin-bottom: 0 !important; } &.export { .disabled { color: #999; } .disabled, a { text-transform: lowercase; } } } article table { border-spacing: 0; border-collapse: collapse; width: 100%; th { border-width: 1px 1px 2px 1px; border-style: solid; border-color: #ccc; } td { border-width: 0 1px 1px 1px; border-style: solid; border-color: #ccc; padding: .25rem .5rem; } } body#collection article, body#subpage article { padding-top: 0; padding-bottom: 0; .book { h2 { font-size: 1.4em; } a.hidden.action { color: #666; float: right; font-size: 1em; margin-left: 1em; margin-bottom: 1em; } } } body#post article { p.badge { font-size: 0.9em; } } article { h2.post-title a[rel=nofollow]::after { content: '\a0 \2934'; } } table.downloads { width: 100%; td { text-align: center; } img.os { width: 48px; vertical-align: middle; margin-bottom: 6px; } } select.inputform, textarea.inputform { border: 1px solid #999; background: white; } input, button, select.inputform, textarea.inputform, a.btn { padding: 0.5em; font-family: @serifFont; font-size: 100%; .rounded(.25em); &[type=submit], &.submit, &.cta { border: 1px solid @primary; background: @primary; color: white; .transition(0.2s); &:hover { background-color: lighten(@primary, 3%); text-decoration: none; } &:disabled { cursor: default; background-color: desaturate(@primary, 100%) !important; border-color: desaturate(@primary, 100%) !important; } } &.error[type=text], textarea.error { -webkit-transition: all 0.30s ease-in-out; -moz-transition: all 0.30s ease-in-out; -ms-transition: all 0.30s ease-in-out; -o-transition: all 0.30s ease-in-out; outline: none; } &.danger { border: 1px solid @dangerCol; background: @dangerCol; color: white; &:hover { background-color: lighten(@dangerCol, 3%); } } &.error[type=text]:focus, textarea.error:focus { box-shadow: 0 0 5px @errUrgentCol; border: 1px solid @errUrgentCol; } } .btn.pager { border: 1px solid @lightNavBorder; font-size: .86em; padding: .5em 1em; white-space: nowrap; font-family: @sansFont; &:hover { text-decoration: none; background: @lightNavBorder; } } .btn.cta.secondary, input[type=submit].secondary { background: transparent; color: @primary; &:hover { background-color: #f9f9f9; } } .btn.cta.disabled { background-color: desaturate(@primary, 100%) !important; border-color: desaturate(@primary, 100%) !important; } div.flat-select { display: inline-block; position: relative; select { border: 0; background: 0; -webkit-appearance: none; -moz-appearance: none; appearance: none; position: absolute; top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; opacity: 0; } &.action { &:hover { label { text-decoration: underline; } } label, select { cursor: pointer; } } } input { &.underline{ border: none; border-bottom: 1px solid #ccc; padding: 0 .2em .2em; font-size: 0.9em; color: #333; } &.inline { padding: 0.2rem 0.2rem; margin-left: 0; font-size: 1em; border: 0 !important; border-bottom: 1px solid #999 !important; width: 7em; .rounded(0); } &[type=tel], &[type=text], &[type=email], &[type=password] { border: 1px solid #999; } &.boxy { border: 1px solid #999 !important; } } #beta, .content-container { max-width: 50em; margin: 0 auto 3em; font-size: 1.2em; &.tight { max-width: 30em; } &.snug { max-width: 40em; } .app { + .app { margin-top: 1.5em; } h2 { margin-bottom: 0.25em; } p { margin-top: 0.25em; } } h2.intro { font-weight: normal; } p { line-height: 1.5; } li { margin: 0.3em 0; } h2 { &.light { font-weight: normal; } a { .transition-duration(0.2s); -moz-transition-property: color; -webkit-transition-property: color; -o-transition-property: color; transition-property: color; &:link, &:visited, &:hover { color: @subheaders; } &:hover { color: lighten(@subheaders, 10%); text-decoration: none; } } } } .content-container { &#pricing { button { cursor: pointer; color: white; margin-top: 1em; margin-bottom: 1em; padding-left: 1.5em; padding-right: 1.5em; border: 0; background: @primary; .rounded(.25em); .transition(0.2s); &:hover { background-color: lighten(@primary, 5%); } &.unselected { cursor: pointer; } } h2 span { font-weight: normal; } .half { margin: 0 0 1em 0; text-align: center; } } div.blurbs { >h2 { text-align: center; color: #333; font-weight: normal; } p.price { font-size: 1.2em; margin-bottom: 0; color: #333; margin-top: 0.5em; &+p { margin-top: 0; font-size: 0.8em; } } p.text-cta { font-size: 1em; } } } footer div.blurbs { display: flex; flex-flow: row; flex-wrap: wrap; } div.blurbs { .half, .third, .fourth { font-size: 0.86em; h3 { font-weight: normal; } p, ul { color: #595959; } hr { margin: 1em 0; } } .half { padding: 0 1em 0 0; width: ~"calc(50% - 1em)"; &+.half { padding: 0 0 0 1em; } } .third { padding: 0; width: ~"calc(33% - 1em)"; &+.third { padding: 0 0 0 1em; } } .fourth { flex: 1 1 25%; -webkit-flex: 1 1 25%; h3 { margin-bottom: 0.5em; } ul { margin-top: 0.5em; } } } .contain-me { text-align: left; margin: 0 auto 4em; max-width: 50em; h2 + p, h2 + p + p, p.describe-me { margin-left: 1.5em; margin-right: 1.5em; color: #333; } } footer.contain-me { font-size: 1.1em; } #official-writing, #wrapper { h2, h3, h4 { color: @subheaders; } ul { &.collections { padding-left: 0; margin-left: 0; h3 { margin-top: 0; font-weight: normal; } li { &.collection { a.title { &:link, &:visited { color: @headerTextColor; } } } a.create { color: #444; } } & + p { margin-top: 2em; margin-left: 1em; } } } } #official-writing, #wrapper { h2 { &.major { color: #222; } &.bugfix { color: #666; } +.android-version { a { color: #999; &:hover { text-decoration: underline; } } } } } li { line-height: 1.5; .item-desc, .prog-lang { font-size: 0.6em; font-family: 'Open Sans', sans-serif; font-weight: bold; margin-left: 0.5em; margin-right: 0.5em; text-transform: uppercase; color: #999; } } .success { color: darken(@proSelectedCol, 20%); } .alert { padding: 1em; margin-bottom: 1.25em; border: 1px solid transparent; .rounded(.25em); &.info { color: #31708f; background-color: #d9edf7; border-color: #bce8f1; } &.success { color: #3c763d; background-color: #dff0d8; border-color: #d6e9c6; } &.danger { border-color: #856404; background-color: white; h3 { margin: 0 0 0.5em 0; font-size: 1em; font-weight: bold; color: black !important; } h3 + p, button { font-size: 0.86em; } } p { margin: 0; &+p { margin-top: 0.5em; } } p.dismiss { font-family: @sansFont; text-align: right; font-size: 0.86em; text-transform: uppercase; } } ul.errors { padding: 0; text-indent: 0; li.urgent { list-style: none; font-style: italic; text-align: center; color: @errUrgentCol; a:link, a:visited { color: purple; } } li.info { list-style: none; font-size: 1.1em; text-align: center; } } body#pad #target a.upgrade-prompt { padding-left: 1em; padding-right: 1em; text-align: center; font-style: italic; color: @primary; } body#pad-sub #posts, .atoms { margin-top: 1.5em; h3 { margin-bottom: 0.25em; &+ h4 { margin-top: 0.25em; margin-bottom: 0.5em; &+ p { margin-top: 0.5em; } } .electron { font-weight: normal; font-size: 0.86em; margin-left: 0.75rem; } } h3, h4 { a { .transition-duration(0.2s); -moz-transition-property: color; -webkit-transition-property: color; -o-transition-property: color; transition-property: color; } } h4 { font-size: 0.9em; font-weight: normal; } date, .electron { margin-right: 0.5em; } .action { font-size: 1em; } #more-posts p { text-align: center; font-size: 1.1em; } p { font-size: 0.86em; } .error { display: inline-block; font-size: 0.8em; font-style: italic; color: @errUrgentCol; strong { font-style: normal; } } .error + nav { display: inline-block; font-size: 0.8em; margin-left: 1em; a + a { margin-left: 0.75em; } } } h2 { a, time { &+.action { margin-left: 0.5em; } } } .action { font-size: 0.7em; font-weight: normal; font-family: @serifFont; &+ .action { margin-left: 0.5em; } &.new-post { font-weight: bold; } } article.moved { p { font-size: 1.2em; color: #999; } } span.as { .opacity(0.2); font-weight: normal; } span.ras { .opacity(0.6); font-weight: normal; } header { nav { .username { font-size: 2em; font-weight: normal; color: #555; } &#user-nav { margin-left: 0; & > a, .tabs > a { &.selected { cursor: default; font-weight: bold; &:hover { text-decoration: none; } } & + a { margin-left: 2em; } } a { font-size: 1.2em; font-family: @sansFont; span { font-size: 0.7em; color: #999; text-transform: uppercase; margin-left: 0.5em; margin-right: 0.5em; } &.title { font-size: 1.6em; font-family: @serifFont; font-weight: bold; } } nav > ul > li:first-child { &> a { display: inline-block; } img { position: relative; top: -0.5em; right: 0.3em; } } ul ul { font-size: 0.8em; a { padding-top: 0.25em; padding-bottom: 0.25em; } } li { line-height: 1.5; } } &.tabs { margin: 0 0 0 1em; } &+ nav.tabs { margin: 0; } } &.singleuser { margin: 0.5em 1em 0.5em 0.25em; nav#user-nav { nav > ul > li:first-child { img { top: -0.75em; } } } .right-side { padding-top: 0.5em; } } .dash-nav { font-weight: bold; } } li#create-collection { display: none; h4 { margin-top: 0px; margin-bottom: 0px; } input[type=submit] { margin-left: 0.5em; } } #collection-options { .option { textarea { font-size: 0.86em; font-family: @monoFont; } .section > p.explain { font-size: 0.8em; } } } .img-placeholder { text-align: center; img { max-width: 100%; } } dl { &.admin-dl-horizontal { dt { font-weight: bolder; width: 360px; } dd { line-height: 1.5; } } } dt { float: left; clear: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } form { dt, dd { padding: 0.5rem 0; } dt { line-height: 1.8; } dd { font-size: 0.86em; line-height: 2; } &.prominent { margin: 1em 0; label { font-weight: bold; } input, select { width: 100%; } select { font-size: 1em; padding: 0.5rem; display: block; border-radius: 0.25rem; margin: 0.5rem 0; } } } div.row { display: flex; align-items: center; > div { flex: 1; } } .check, .blip { font-size: 1.125em; color: #71D571; } .ex.failure { font-weight: bold; color: @dangerCol; } @media all and (max-width: 450px) { body#post { header { nav { .xtra-feature { display: none; } } } } } @media all and (min-width: 1280px) { body#promo { div.heading { margin: 10em 0; } } } @media all and (min-width: 1600px) { body#promo { div.heading { margin: 14em 0; } } } @media all and (max-width: 900px) { .half.big { padding: 0 !important; width: 100% !important; } .third { padding: 0 !important; float: none; width: 100% !important; p.introduction { font-size: 0.86em; } } div.blurbs { .fourth { flex: 1 1 15em; -webkit-flex: 1 1 15em; } } .blurbs .third, .blurbs .half { p, ul { text-align: left; } } .half-col, .big { float: none; text-align: center; &+.half-col, &+.big { margin-top: 4em !important; margin-left: 0; } } #beta, .content-container { font-size: 1.15em; } } @media all and (max-width: 600px) { div.row:not(.admin-actions) { flex-direction: column; } .half { padding: 0 !important; width: 100% !important; } .third { width: 100% !important; float: none; } body#promo { div.heading { margin: 6em 0; } h2 { font-size: 1.6em; } .half-col a + a { margin-left: 1em; } .half-col a.channel { margin-left: auto !important; margin-right: auto !important; } } ul.add-integrations { li { display: list-item; &+ li { margin-left: 0; } } } } @media all and (max-height: 500px) { body#promo { div.heading { margin: 5em 0; } } } @media all and (max-height: 400px) { body#promo { div.heading { margin: 0em 0; } } } /* Smartphones (portrait and landscape) ----------- */ @media only screen and (min-device-width : 320px) and (max-device-width : 480px) { header { .opacity(1); } } /* Smartphones (portrait) ----------- */ @media only screen and (max-width : 320px) { .content-container#pricing { .half { float: none; width: 100%; } } header { .opacity(1); } } /* iPads (portrait and landscape) ----------- */ @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) { header { .opacity(1); } } @media (pointer: coarse) { body footer nav a:not(.pubd) { padding: 0.8em 1em; margin-left: 0; margin-top: 0; } article { .hidden { .opacity(1); } } } @media print { h1 { page-break-before: always; } h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } table, figure { page-break-inside: avoid; } header, footer { display: none; } article#post-body { margin-top: 2em; margin-left: 0; margin-right: 0; } hr { border: 1px solid #ccc; } } .code-block { padding: 0; max-width: 100%; margin: 0; background: #f8f8f8; border: 1px solid #ccc; padding: 0.375em 0.625em; font-size: 0.86em; .rounded(.25em); } pre.code-block { overflow-x: auto; } #org-nav { font-family: @sansFont; font-size: 1.1em; color: #888; em, strong { color: #000; } &+h1 { margin-top: 0.5em; } a:link, a:visited, a:hover { color: @accent; } a:first-child { margin-right: 0.25em; } a.coll-name { font-weight: bold; margin-left: 0.25em; } } \ No newline at end of file diff --git a/locales.go b/locales.go new file mode 100644 index 0000000..bf153bb --- /dev/null +++ b/locales.go @@ -0,0 +1,44 @@ +package writefreely + +import ( + //"fmt" + "io/ioutil" + "os" + //"encoding/json" + + "github.com/writeas/web-core/log" + "git.lainoa.eus/aitzol/po2json" +) + +func (app *App) GenJsonFiles(){ + + lang := app.cfg.App.Lang + log.Info("Generating json %s locales...", lang) + //fmt.Println(lang) + locales := []string {} + domain := "base" + localedir := "./locales" + files,_ := ioutil.ReadDir(localedir) + for _, f := range files { + if f.IsDir() { + //fmt.Println(f.Name()) + locales = append(locales, f.Name(),) + + if (lang == f.Name()){ //only creates json file for locale set in config.ini + //file, _ := json.MarshalIndent(po2json.PO2JSON([]string{f.Name(),}, domain, localedir), "", " ") + file := po2json.PO2JSON([]string{f.Name(),}, domain, localedir) + + //err := os.WriteFile(f.Name()+".json",[]byte(file), 0666) + err := ioutil.WriteFile("static/js/"+f.Name()+".json",[]byte(file), 0666) + if err != nil { + log.Error(err.Error()) + os.Exit(1) + } + } + + } + } + + //fmt.Println(po2json.PO2JSON(locales, domain, localedir)) + +} \ No newline at end of file diff --git a/locales/base.pot b/locales/base.pot new file mode 100644 index 0000000..e34afb3 --- /dev/null +++ b/locales/base.pot @@ -0,0 +1,1581 @@ +msgid "" +msgstr "" +"Project-Id-Version: GOtext\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: Aitzol Berasategi \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 2.4.2\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +# base.tmpl 40 +# header.tmpl 49 +# pages.tmpl 21 +msgid "Home" +msgstr "Home" + +# base.tmpl 42 +# header.tmpl 51 +# footer.tmpl 8,26 +# user/include/footer.tmpl 11 +msgid "About" +msgstr "About" + +# base.tmpl 49 +# header.tmpl 58,65 +# footer.tmpl 9,27 +# user/include/footer.tmpl 12 +# app-settings.tmpl 108 +# pages.tmpl 24 +msgid "Reader" +msgstr "Reader" + +# login.tmpl 21 +# password-collection.tmpl 33 +# base.tmpl 51 +# header.tmpl 60 +msgid "Log in" +msgstr "Log in" + +# classic.tmpl 48 +# collection.tmpl 63,74 +# pad.tmpl 43 +# base.tmpl 33,51 +# header.tmpl 14,41,60 +msgid "Log out" +msgstr "Log out" + +# base.tmpl 45 +# export.tmpl 19 +# collections.tmpl 13 +# user/collection.tmpl 105 +# admin.tmpl 59 +# nav.tmpl 2 +# header.tmpl 54,63 +# view-user 106 +msgid "Blog" +msgid_plural "Blogs" +msgstr[0] "Blog" +msgstr[1] "Blogs" + +# bare.tmpl 33 +# export.tmpl 19 +# admin.tmpl 60 +# view-user 132 +msgid "Post" +msgid_plural "Posts" +msgstr[0] "Post" +msgstr[1] "Posts" + +# bare.tmpl 26 +# header.tmpl 55 +msgid "My Posts" +msgstr "My Posts" + +# classic.tmpl 38 +# edit-meta.tmpl 43 +# pad.tmpl 26,27,33 +# post.tmpl 47 +# base.tmpl 47 +# bare.tmpl 26 +# stats.tmpl 55 +# import.tmpl 41 +# articles.tmpl 25 +# header.tmpl 21,56,64 +# posts.tmpl 23,30,50,57 +msgid "Draft" +msgid_plural "Drafts" +msgstr[0] "Draft" +msgstr[1] "Drafts" + +# login.tmpl 27 +# base.tmpl 50 +# header.tmpl 59 +msgid "Sign up" +msgstr "Sign up" + +# classic.tmpl 5 +# collection.tmpl 53 +# pad.tmpl 5 +# base.tmpl 55 +# nav.tmpl 9 +# header.tmpl 25,71 +msgid "New Post" +msgstr "New Post" + +# header.tmpl 29 +msgid "Return to editor" +msgstr "Return to editor" + +# footer.tmpl 10,14,34 +# user/include/footer.tmpl 13 +msgid "writer's guide" +msgstr "writer's guide" + +# footer.tmpl 15,35 +msgid "developers" +msgstr "developers" + +# footer.tmpl 11,28 +# user/include/footer.tmpl 14 +msgid "privacy" +msgstr "privacy" + +# footer.tmpl 16,36 +msgid "source code" +msgstr "source code" + +# base.tmpl 28 +# header.tmpl 9,35 +msgid "Admin dashboard" +msgstr "Admin dashboard" + +# base.tmpl 29 +# header.tmpl 10,36 +msgid "Account settings" +msgstr "Account settings" + +# import.tmpl 17 +# header.tmpl 11,37 +msgid "Import posts" +msgstr "Import posts" + +# base.tmpl 30 +# export.tmpl 5,10 +# header.tmpl 12,38 +msgid "Export" +msgstr "Export" + +# header.tmpl 103 +msgid "Dashboard" +msgstr "Dashboard" + +# header.tmpl 104 +msgid "Settings" +msgstr "Settings" + +# export.tmpl 19 +# admin.tmpl 58 +# header.tmpl 106 +# view-user.tmpl 59 +# users.tmpl 15,21,30 +msgid "User" +msgid_plural "Users" +msgstr[0] "User" +msgstr[1] "Users" + +# header.tmpl 107 +# pages.tmpl 13, 17 +msgid "Page" +msgid_plural "Pages" +msgstr[0] "Page" +msgstr[1] "Pages" + +# post.tmpl 41 +# posts.tmpl 11,43,64,66 +# view-user 128 +msgid "View" +msgid_plural "Views" +msgstr[0] "View" +msgstr[1] "Views" + +# posts.tmpl 11,43,64,66 +# view-user 128 +# edit-meta.tmpl 49,55 +# pad.tmpl 63 +msgid "View post" +msgid_plural "View posts" +msgstr[0] "View post" +msgstr[1] "View posts" + +# classic.tmpl 41,45 +# collection.tmpl 57 +# header.tmpl 7 +# edit-meta.tmpl 41 +# pad.tmpl 24,36,40 +# nav.tmpl 12 +msgid "View Blog" +msgid_plural "View Blogs" +msgstr[0] "View Blog" +msgstr[1] "View Blogs" + +# classic.tmpl 62 +# pad.tmpl 124 +msgid "word" +msgid_plural "words" +msgstr[0] "word" +msgstr[1] "words" + +# pad.tmpl 64 +msgid "Publish" +msgstr "Publish" + +# pad.tmpl 20 +# bare.tmpl 20 +msgid "This post has been updated elsewhere since you last published!" +msgstr "This post has been updated elsewhere since you last published!" + +# pad.tmpl 20 +# bare.tmpl 20 +msgid "Delete draft and reload" +msgstr "Delete draft and reload" + +msgid "Updates" +msgstr "Updates" + +# classic.tmpl 42 +# pad.tmpl 37 +# user/collection.tmpl 32 +# collection.tmpl 54 +# nav.tmpl 10 +# header.tmpl 19 +msgid "Customize" +msgstr "Customize" + +# classic.tmpl 43 +# collection.tmpl 55 +# pad.tmpl 38 +# stats.tmpl 26 +# nav.tmpl 11 +# header.tmpl 20 +msgid "Stats" +msgstr "Stats" + +# classic.tmpl 47 +# collection.tmpl 58 +# pad.tmpl 42 +msgid "View Draft" +msgid_plural "View Drafts" +msgstr[0] "View Draft" +msgstr[1] "View Drafts" + +# header.tmpl 111 +msgid "Monitor" +msgstr "Monitor" + +# read.tmpl 108,110 +msgid "Read more..." +msgstr "Read more..." + +# silenced.tmpl 3 +msgid "Your account has been silenced." +msgstr "Your account has been silenced." + +# silenced.tmpl 3 +msgid "You can still access all of your posts and blogs, but no one else can currently see them." +msgstr "You can still access all of your posts and blogs, but no one else can currently see them." + +# articles.tmpl 28 +msgid "These are your draft posts. You can share them individually (without a blog) or move them to your blog when you're ready." +msgstr "These are your draft posts. You can share them individually (without a blog) or move them to your blog when you're ready." + +# articles.tmpl 57 +msgid "Your anonymous and draft posts will show up here once you've published some. You'll be able to share them individually (without a blog) or move them to a blog when you're ready." +msgstr "Your anonymous and draft posts will show up here once you've published some. You'll be able to share them individually (without a blog) or move them to a blog when you're ready." + +# articles.tmpl 58 +msgid "Alternatively, see your blogs and their posts on your %s page." +msgstr "Alternatively, see your blogs and their posts on your %s page." + +# articles.tmpl 60 +msgid "Start writing" +msgstr "Start writing" + +# articles.tmpl 64 +# static/js/postactions.jsmsgid "unsynced posts" +msgstr "unsynced posts" + +# articles.tmpl 64 +# collection.tmpl 43 +# view-page.tmpl 51 +# view-user 116 +msgid "Title" +msgstr "Title" + +# user/collection.tmpl 44 +# view-user 120 +msgid "Description" +msgstr "Description" + +# user/collection.tmpl 50 +msgid "This blog uses your username in its URL." +msgstr "This blog uses your username in its URL." + +# user/collection.tmpl 50 +msgid "This blog uses your username in its URL and fediverse handle." +msgstr "This blog uses your username in its URL and fediverse handle." + +# user/collection.tmpl 50 +msgid "You can change it in your %s." +msgstr "You can change it in your %s." + +# user/collection.tmpl 63 +msgid "Publicity" +msgstr "Publicity" + +# user/collection.tmpl 68 +# app-settings.tmpl 120 +msgid "Unlisted" +msgstr "Unlisted" + +# user/collection.tmpl 87 +# app-settings.tmpl 121 +msgid "Public" +msgstr "Public" + +# user/collection.tmpl 74 +# app-settings.tmpl 122 +msgid "Private" +msgstr "Private" + +# user/collection.tmpl 70 +msgid "This blog is visible to any registered user on this instance." +msgstr "This blog is visible to any registered user on this instance." + +# user/collection.tmpl 70 +msgid "This blog is visible to anyone with its link." +msgstr "This blog is visible to anyone with its link." + +# user/collection.tmpl 76 +msgid "Only you may read this blog (while you're logged in)." +msgstr "Only you may read this blog (while you're logged in)." + +# user/collection.tmpl 80 +msgid "Password-protected:" +msgstr "Password-protected:" + +# user/collection.tmpl 80 +msgid "a memorable password" +msgstr "a memorable password" + +# user/collection.tmpl 82 +msgid "A password is required to read this blog." +msgstr "A password is required to read this blog." + +# user/collection.tmpl 89 +msgid "This blog is displayed on the public %s, and is visible to anyone with its link." +msgstr "This blog is displayed on the public %s, and is visible to anyone with its link." + +# user/collection.tmpl 89 +msgid "This blog is displayed on the public %s, and is visible to any registered user on this instance." +msgstr "This blog is displayed on the public %s, and is visible to any registered user on this instance." + +# user/collection.tmpl 90 +msgid "The public reader is currently turned off for this community." +msgstr "The public reader is currently turned off for this community." + +# user/collection.tmpl 98 +msgid "Display Format" +msgstr "Display Format" + +# user/collection.tmpl 100 +msgid "Customize how your posts display on your page." +msgstr "Customize how your posts display on your page." + +# user/collection.tmpl 107 +msgid "Dates are shown. Latest posts listed first." +msgstr "Dates are shown. Latest posts listed first." + +# user/collection.tmpl 113 +msgid "No dates shown. Oldest posts first." +msgstr "No dates shown. Oldest posts first." + +# user/collection.tmpl 119 +msgid "No dates shown. Latest posts first." +msgstr "No dates shown. Latest posts first." + +# user/collection.tmpl 126 +msgid "Text Rendering" +msgstr "Text Rendering" + +# user/collection.tmpl 128 +msgid "Customize how plain text renders on your blog." +msgstr "Customize how plain text renders on your blog." + +# user/collection.tmpl 145 +msgid "Custom CSS" +msgstr "Custom CSS" + +# user/collection.tmpl 148 +msgid "customization" +msgstr "customization" + +# user/collection.tmpl 148 +msgid "See our guide on %s." +msgstr "See our guide on %s." + +# user/collection.tmpl 153 +msgid "Post Signature" +msgstr "Post Signature" + +# user/collection.tmpl 155 +msgid "This content will be added to the end of every post on this blog, as if it were part of the post itself. Markdown, HTML, and shortcodes are allowed." +msgstr "This content will be added to the end of every post on this blog, as if it were part of the post itself. Markdown, HTML, and shortcodes are allowed." + +# user/collection.tmpl 162 +msgid "Web Monetization" +msgstr "Web Monetization" + +# user/collection.tmpl 164 +msgid "Web Monetization enables you to receive micropayments from readers that have a %s. Add your payment pointer to enable Web Monetization on your blog." +msgstr "Web Monetization enables you to receive micropayments from readers that have a %s. Add your payment pointer to enable Web Monetization on your blog." + +# user/collection.tmpl 164 +msgid "Coil membership" +msgstr "Coil membership" + +# edit-meta.tmpl 263 +# settings.tmpl 81 +# user/collection.tmpl 171 +msgid "Save changes" +msgstr "Save changes" + +# user/collection.tmpl 173 +msgid "Delete Blog..." +msgstr "Delete Blog..." + +# user/collection.tmpl 190,220 +# articles.tmpl 36 +# posts.tmpl 19,46 +msgid "Delete" +msgstr "Delete" + +# settings.tmpl 187 +# user/collection.tmpl 189 +# view-user 173 +msgid "Cancel" +msgstr "Cancel" + +# user/collection.tmpl 180 +msgid "Are you sure you want to delete this blog?" +msgstr "Are you sure you want to delete this blog?" + +# posts.js 46,147 +# collection.tmpl 148 +# collection-tags.tmpl 96 +# chorus-collection.tmpl 132 +msgid "Are you sure you want to delete this post?" +msgstr "Are you sure you want to delete this post?" + +# posts.js 302 +# collection.tmpl 175,226 +# collection-tags.tmpl 123,174 +# chorus-collection.tmpl 159,210 +msgid "Post is synced to another account. Delete the post from that account instead." +msgstr "Post is synced to another account. Delete the post from that account instead." + +# posts.js 308 +# collection.tmpl 181 +# collection-tags.tmpl 129 +# chorus-collection.tmpl 165 +msgid "Failed to delete." +msgstr "Failed to delete." + +# posts.js 308 +# collection.tmpl 181 +# collection-tags.tmpl 129 +# chorus-collection.tmpl 165 +msgid "Please try again." +msgstr "Please try again." + +# user/collection.tmpl 182 +msgid "This will permanently erase **%s** (%s/%s) from the internet. Any posts on this blog will be saved and made into drafts (found on your %s page)." +msgstr "This will permanently erase **%s** (%s/%s) from the internet. Any posts on this blog will be saved and made into drafts (found on your %s page)." + +# user/collection.tmpl 183 +msgid "If you're sure you want to delete this blog, enter its name in the box below and press **%s**." +msgstr "If you're sure you want to delete this blog, enter its name in the box below and press **%s**." + +# user/collection.tmpl 202 +msgid "Enter **%s** in the box below." +msgstr "Enter **%s** in the box below." + +# user/collection.tmpl 238 +msgid "Saving changes..." +msgstr "Saving changes..." + +# collections.tmpl 72,75,84 +msgid "This name is taken." +msgstr "This name is taken." + +# pad.tmpl 61 +msgid "Edit post metadata" +msgstr "Edit post metadata" + +# edit-meta.tmpl 5,55 +msgid "Edit metadata" +msgstr "Edit metadata" + +# edit-meta.tmpl 260 +msgid "now" +msgstr "now" + +# edit-meta.tmpl 63 +msgid "Slug" +msgstr "Slug" + +# edit-meta.tmpl 66 +msgid "Language" +msgstr "Language" + +# edit-meta.tmpl 256 +msgid "Direction" +msgstr "Direction" + +# edit-meta.tmpl 258 +msgid "Created" +msgstr "Created" + +# edit-meta.tmpl 257 +msgid "right-to-left" +msgstr "right-to-left" + +# edit-meta.tmpl 47 +msgid "Edit post" +msgstr "Edit post" + +# edit-meta.tmpl 48 +# pad.tmpl 62 +msgid "Toggle theme" +msgstr "Toggle theme" + +# collection-post.tmpl 66 +# posts.tmpl 8 +msgid "Scheduled" +msgstr "Scheduled" + +# collection-post.tmpl 57 +# post.tmpl 45,91 +# articles.tmpl 35 +# posts.tmpl 17,44 +msgid "Edit" +msgstr "Edit" + +# posts.tmpl 18,45 +msgid "Pin" +msgstr "Pin" + +# collection-post.tmpl 58 +msgid "Unpin" +msgstr "Unpin" + +# posts.tmpl 21,48 +msgid "Move this post to another blog" +msgstr "Move this post to another blog" + +# posts.tmpl 30,57 +msgid "Change to a draft" +msgstr "Change to a draft" + +# posts.tmpl 30,57 +msgid "change to _%s_" +msgstr "change to _%s_" + +# articles.tmpl 43,78 +# posts.tmpl 26,53 +msgid "move to..." +msgstr "move to..." + +# articles.tmpl 47,83 +msgid "move to %s" +msgstr "move to %s" + +# post.tmpl 42 +msgid "View raw" +msgstr "View raw" + +# articles.tmpl 47,83 +msgid "Publish this post to your blog %s" +msgstr "Publish this post to your blog %s" + +# articles.tmpl 39,74 +msgid "Move this post to one of your blogs" +msgstr "Move this post to one of your blogs" + +# articles.tmpl 55 +msgid "Load more..." +msgstr "Load more..." + +# stats.tmpl 32 +msgid "Stats for all time." +msgstr "Stats for all time." + +# stats.tmpl 35 +msgid "Fediverse stats" +msgstr "Fediverse stats" + +# stats.tmpl 38 +msgid "Followers" +msgstr "Followers" + +# stats.tmpl 46 +msgid "Top %d post" +msgid_plural "Top %d posts" +msgstr[0] "Top %d post" +msgstr[1] "Top %d posts" + +# stats.tmpl 51 +msgid "Total Views" +msgstr "Total Views" + +# settings.tmpl 27 +msgid "Before you go..." +msgstr "Before you go..." + +# settings.tmpl 27 +msgid "Account Settings" +msgstr "Account Settings" + +# settings.tmpl 38 +msgid "Change your account settings here." +msgstr "Change your account settings here." + +# signup.tmpl 80 +# signup-oauth.tmpl 85,87 +# login.tmpl 21 +# landing.tmpl 92 +# settings.tmpl 43 +# view-user.tmpl 62 +msgid "Username" +msgstr "Username" + +# settings.tmpl 46 +msgid "Update" +msgstr "Update" + +# settings.tmpl 56 +msgid "Passphrase" +msgstr "Passphrase" + +# settings.tmpl 58 +msgid "Add a passphrase to easily log in to your account." +msgstr "Add a passphrase to easily log in to your account." + +# settings.tmpl 59,60 +msgid "Current passphrase" +msgstr "Current passphrase" + +# settings.tmpl 61,64 +msgid "New passphrase" +msgstr "New passphrase" + +# settings.tmpl 60,64 +msgid "Show" +msgstr "Show" + +msgid "Account updated." +msgstr "Account updated." + +# signup.tmpl 91 +# signup-oauth.tmpl 92,94 +# landing.tmpl 103 +# settings.tmpl 69 +msgid "Email" +msgstr "Email" + +# settings.tmpl 76 +msgid "Email address" +msgstr "Email address" + +# settings.tmpl 71 +msgid "Add your email to get:" +msgstr "Add your email to get:" + +# settings.tmpl 34 +msgid "Please add an **%s** and/or **%s** so you can log in again later." +msgstr "Please add an **%s** and/or **%s** so you can log in again later." + +# settings.tmpl 73 +msgid "No-passphrase login" +msgstr "No-passphrase login" + +# settings.tmpl 74 +msgid "Account recovery if you forget your passphrase" +msgstr "Account recovery if you forget your passphrase" + +# settings.tmpl 89 +msgid "Linked Accounts" +msgstr "Linked Accounts" + +# settings.tmpl 90 +msgid "These are your linked external accounts." +msgstr "These are your linked external accounts." + +# settings.tmpl 114 +msgid "Link External Accounts" +msgstr "Link External Accounts" + +msgid "Connect additional accounts to enable logging in with those providers, instead of using your username and password." +msgstr "Connect additional accounts to enable logging in with those providers, instead of using your username and password." + +# settings.tmpl 162 +# view-user 149 +msgid "Incinerator" +msgstr "Incinerator" + +# settings.tmpl 166,169,188 +msgid "Delete your account" +msgstr "Delete your account" + +# settings.tmpl 167 +msgid "Permanently erase all your data, with no way to recover it." +msgstr "Permanently erase all your data, with no way to recover it." + +# settings.tmpl 176 +# view-user 163 +msgid "Are you sure?" +msgstr "Are you sure?" + +# settings.tmpl 178 +msgid "export your data" +msgstr "export your data" + +# settings.tmpl 178 +msgid "This action **cannot** be undone. It will immediately and permanently erase your account, including your blogs and posts. Before continuing, you might want to %s." +msgstr "This action **cannot** be undone. It will immediately and permanently erase your account, including your blogs and posts. Before continuing, you might want to %s." + +# settings.tmpl 179 +msgid "If you're sure, please type **%s** to confirm." +msgstr "If you're sure, please type **%s** to confirm." + +# invite-help.tmpl 13 +msgid "Invite to %s" +msgstr "Invite to %s" + +# invite-help.tmpl 15 +msgid "This invite link is expired." +msgstr "This invite link is expired." + +# invite-help.tmpl 21 +msgid "Only **one** user" +msgstr "Only **one** user" + +# invite-help.tmpl 21 +msgid "Up to **%d** users" +msgstr "Up to **%d** users" + +# invite-help.tmpl 21 +msgid "can sign up with this link." +msgstr "can sign up with this link." + +# invite-help.tmpl 23 +msgid "It expires on **%s**." +msgstr "It expires on **%s**." + +# invite-help.tmpl 25 +msgid "It can be used as many times as you like" +msgstr "It can be used as many times as you like" + +# invite-help 25 +msgid "before **%s**, when it expires" +msgstr "before **%s**, when it expires" + +msgid "person has" +msgid_plural "person have" +msgstr[0] "person has" +msgstr[1] "person have" + +# invite-help.tmpl 21 +msgid "So far, **%d** %s used it." +msgstr "So far, **%d** %s used it." + +# invite-help.tmpl 17 +msgid "Copy the link below and send it to anyone that you want to join *%s*. You could paste it into an email, instant message, text message, or write it down on paper. Anyone who navigates to this special page will be able to create an account." +msgstr "Copy the link below and send it to anyone that you want to join *%s*. You could paste it into an email, instant message, text message, or write it down on paper. Anyone who navigates to this special page will be able to create an account." + +# IMPORT PAGE +# import.tmpl 28 +msgid "Publish plain text or Markdown files to your account by uploading them below." +msgstr "Publish plain text or Markdown files to your account by uploading them below." + +# import.tmpl 31 +msgid "Select some files to import:" +msgstr "Select some files to import:" + +# import.tmpl 36 +msgid "Import these posts to:" +msgstr "Import these posts to:" + +# import.tmpl 59 +msgid "Import" +msgstr "Import" + +msgid "Import complete, %d post imported." +msgid_plural "Import complete, %d posts imported." +msgstr[0] "Import complete, %d post imported." +msgstr[1] "Import complete, %d posts imported." + +msgid "%d of %d posts imported, see details below." +msgid_plural "%d of %d posts imported, see details below." +msgstr[0] "%d of %d posts imported, see details below." +msgstr[1] "%d of %d posts imported, see details below." + +msgid "%s is not a supported post file" +msgstr "%s is not a supported post file" + +# export.tmpl 6 +msgid "Your data on %s is always free. Download and back-up your work any time." +msgstr "Your data on %s is always free. Download and back-up your work any time." + +# export.tmpl 11 +msgid "Format" +msgstr "Format" + +# header.tmpl 101 +msgid "Admin" +msgstr "Admin" + +# app-settings.tmpl 37 +msgid "Site Title" +msgstr "Site Title" + +# app-settings.tmpl 38 +msgid "Your public site name." +msgstr "Your public site name." + +# app-settings.tmpl 44 +msgid "Site Description" +msgstr "Site Description" + +# app-settings.tmpl 45 +msgid "Describe your site — this shows in your site's metadata." +msgstr "Describe your site — this shows in your site's metadata." + +# app-settings.tmpl 51 +msgid "Host" +msgstr "Host" + +# app-settings.tmpl 52 +msgid "The public address where users will access your site, starting with `http://` or `https://`." +msgstr "The public address where users will access your site, starting with `http://` or `https://`." + +# app-settings.tmpl 58 +msgid "Community Mode" +msgstr "Community Mode" + +# app-settings.tmpl 59 +msgid "Whether your site is made for one person or many." +msgstr "Whether your site is made for one person or many." + +# app-settings.tmpl 61 +msgid "Single user" +msgstr "Single user" + +# app-settings.tmpl 61 +msgid "Multiple users" +msgstr "Multiple users" + +# app-settings.tmpl 65 +msgid "Landing Page" +msgstr "Landing Page" + +# app-settings.tmpl 66 +msgid "The page that logged-out visitors will see first. This should be an absolute path like: `/read`." +msgstr "The page that logged-out visitors will see first. This should be an absolute path like: `/read`." + +# app-settings.tmpl 72 +msgid "Open Registrations" +msgstr "Open Registrations" + +# app-settings.tmpl 73 +msgid "Allow anyone who visits the site to create an account." +msgstr "Allow anyone who visits the site to create an account." + +# app-settings.tmpl 80 +msgid "Allow account deletion" +msgstr "Allow account deletion" + +# app-settings.tmpl 81 +msgid "Allow all users to delete their account. Admins can always delete users." +msgstr "Allow all users to delete their account. Admins can always delete users." + +# app-settings.tmpl 88 +msgid "Allow invitations from..." +msgstr "Allow invitations from..." + +# app-settings.tmpl 89 +msgid "Choose who is allowed to invite new people." +msgstr "Choose who is allowed to invite new people." + +# app-settings.tmpl 93 +msgid "No one" +msgstr "No one" + +# app-settings.tmpl 94 +msgid "Only Admins" +msgstr "Only Admins" + +# app-settings.tmpl 95 +msgid "All Users" +msgstr "All Users" + +# app-settings.tmpl 101 +msgid "Private Instance" +msgstr "Private Instance" + +# app-settings.tmpl 102 +msgid "Limit site access to people with an account." +msgstr "Limit site access to people with an account." + +# app-settings.tmpl 109 +msgid "Show a feed of user posts for anyone who chooses to share there." +msgstr "Show a feed of user posts for anyone who chooses to share there." + +# app-settings.tmpl 115 +msgid "Default blog visibility" +msgstr "Default blog visibility" + +# app-settings.tmpl 116 +msgid "The default setting for new accounts and blogs." +msgstr "The default setting for new accounts and blogs." + +# app-settings.tmpl 128 +msgid "Maximum Blogs per User" +msgstr "Maximum Blogs per User" + +# app-settings.tmpl 129 +msgid "Keep things simple by setting this to **1**, unlimited by setting to **0**, or pick another amount." +msgstr "Keep things simple by setting this to **1**, unlimited by setting to **0**, or pick another amount." + +# app-settings.tmpl 135 +msgid "Federation" +msgstr "Federation" + +# app-settings.tmpl 136 +msgid "Enable accounts on this site to propagate their posts via the ActivityPub protocol." +msgstr "Enable accounts on this site to propagate their posts via the ActivityPub protocol." + +# app-settings.tmpl 142 +msgid "Public Stats" +msgstr "Public Stats" + +# app-settings.tmpl 143 +msgid "Publicly display the number of users and posts on your **%s** page." +msgstr "Publicly display the number of users and posts on your **%s** page." + +# app-settings.tmpl 149 +msgid "Monetization" +msgstr "Monetization" + +# app-settings.tmpl 150 +msgid "Enable blogs on this site to receive micropayments from readers via %s." +msgstr "Enable blogs on this site to receive micropayments from readers via %s." + +# app-settings.tmpl 156 +msgid "Minimum Username Length" +msgstr "Minimum Username Length" + +# app-settings.tmpl 157 +msgid "The minimum number of characters allowed in a username. (Recommended: 2 or more.)" +msgstr "The minimum number of characters allowed in a username. (Recommended: 2 or more.)" + +# app-settings.tmpl 162 +msgid "Save Settings" +msgstr "Save Settings" + +# app-settings.tmpl 166 +msgid "configuration docs" +msgstr "configuration docs" + +# app-settings.tmpl 166 +msgid "Still have questions? Read more details in the %s." +msgstr "Still have questions? Read more details in the %s." + +msgid "Configuration saved." +msgstr "Configuration saved." + +# view-user.tmpl 66 +# users.tmpl 22 +msgid "joined" +msgstr "joined" + +# users.tmpl 23 +msgid "type" +msgstr "type" + +# users.tmpl 24 +# view-user.tmpl 79 +msgid "status" +msgstr "status" + +# base.tmpl 31 +# header.tmpl 39 +# invite.tmpl 26 +# users.tmpl 16 +msgid "Invite people" +msgstr "Invite people" + +# invite.tmpl 27 +msgid "Invite others to join *%s* by generating and sharing invite links below." +msgstr "Invite others to join *%s* by generating and sharing invite links below." + +# invite.tmpl 31 +msgid "Maximum number of uses:" +msgstr "Maximum number of uses:" + +# invite.tmpl 33 +msgid "No limit" +msgstr "No limit" + +# invite.tmpl 34,35,36,37,38,39,64 +msgid "use" +msgid_plural "uses" +msgstr[0] "use" +msgstr[1] "uses" + +# invite.tmpl 43 +msgid "Expire after:" +msgstr "Expire after:" + +# invite.tmpl 46 +msgid "minute" +msgid_plural "minutes" +msgstr[0] "minute" +msgstr[1] "minutes" + +# invite.tmpl 47,48,49 +msgid "hour" +msgid_plural "hours" +msgstr[0] "hour" +msgstr[1] "hours" + +# invite.tmpl 50,51 +msgid "day" +msgid_plural "days" +msgstr[0] "day" +msgstr[1] "days" + +# invite.tmpl 52 +msgid "week" +msgid_plural "weeks" +msgstr[0] "week" +msgstr[1] "weeks" + +# invite.tmpl 57 +msgid "You cannot generate invites while your account is silenced." +msgstr "You cannot generate invites while your account is silenced." + +# invite.tmpl 57 +msgid "Generate" +msgstr "Generate" + +# invite.tmpl 63 +msgid "Link" +msgstr "Link" + +# invite.tmpl 121,129,137,145,152 +msgid "ToLink" +msgstr "Link" + +# invite.tmpl 65 +msgid "Expires" +msgstr "Expires" + +# invite.tmpl 71 +msgid "Expired" +msgstr "Expired" + +# invite.tmpl 75 +msgid "No invites generated yet." +msgstr "No invites generated yet." + +# pages.tmpl 18 +msgid "last modified" +msgstr "last modified" + +# view-user.tmpl 85 +# users.tmpl 31 +msgid "Active" +msgstr "Active" + +# view-user.tmpl 82 +# users.tmpl 31 +msgid "Silenced" +msgstr "Silenced" + +# view-user.tmpl 83 +msgid "Unsilence" +msgstr "Unsilence" + +# view-user 86 +msgid "disabled" +msgstr "disabled" + +# view-user 86 +msgid "Silence" +msgstr "Silence" + +# view-user.tmpl 54 +msgid "No." +msgstr "No." + +# view-user.tmpl 70 +msgid "total posts" +msgstr "total posts" + +# view-user.tmpl 74,136 +msgid "last post" +msgstr "last post" + +# signup.tmpl 87 +# login.tmpl 22 +# landing.tmpl 99 +# view-user 92 +msgid "password" +msgstr "password" + +msgid "Change your password" +msgstr "Change your password" + +# view-user 100 +msgid "Go to reset password page" +msgstr "Go to reset password page" + +# view-user 141 +msgid "Fediverse followers" +msgstr "Fediverse followers" + +# view-user 124 +msgid "Visibility" +msgstr "Visibility" + +# view-user 112 +msgid "Alias" +msgstr "Alias" + +# view-user.tmpl 75,137 +msgid "Never" +msgstr "Never" + +# view-user 97 +msgid "Reset" +msgstr "Reset" + +# view-user 153,156,174 +msgid "Delete this user" +msgstr "Delete this user" + +# view-user 154 +msgid "Permanently erase all user data, with no way to recover it." +msgstr "Permanently erase all user data, with no way to recover it." + +# view-user 165 +msgid "This action **cannot**be undone. It will permanently erase all traces of this user, **%s**, including their account information, blogs, and posts." +msgstr "This action **cannot**be undone. It will permanently erase all traces of this user, **%s**, including their account information, blogs, and posts." + +# view-user 166 +msgid "Please type **%s** to confirm." +msgstr "Please type **%s** to confirm." + +# view-user 202 +msgid "Silence this user? They'll still be able to log in and access their posts, but no one else will be able to see them anymore. You can reverse this decision at any time." +msgstr "Silence this user? They'll still be able to log in and access their posts, but no one else will be able to see them anymore. You can reverse this decision at any time." + +# view-user 208 +msgid "Reset this user's password? This will generate a new temporary password that you'll need to share with them, and invalidate their old one." +msgstr "Reset this user's password? This will generate a new temporary password that you'll need to share with them, and invalidate their old one." + +# settings.tmpl 225 +# user/collection.tmpl 207 +# view-user.tmpl 198 +msgid "Deleting..." +msgstr "Deleting..." + +# view-user.tmpl 46 +msgid "This user's password has been reset to:" +msgstr "This user's password has been reset to:" + +# view-user.tmpl 48 +msgid "They can use this new password to log in to their account. **This will only be shown once**, so be sure to copy it and send it to them now." +msgstr "They can use this new password to log in to their account. **This will only be shown once**, so be sure to copy it and send it to them now." + +# view-user.tmpl 49 +msgid "Their email address is:" +msgstr "Their email address is:" + +# app-updates.tmlp 19 +msgid "Automated update check failed." +msgstr "Automated update check failed." + +# app-updates.tmlp 20, 24, 41 +msgid "Installed version: %s (%s)." +msgstr "Installed version: %s (%s)." + +# app-updates.tmlp 21, 42 +msgid "Learn about latest releases on the %s or %s." +msgstr "Learn about latest releases on the %s or %s." + +# app-updates.tmlp 23 +msgid "WriteFreely is **up to date**." +msgstr "WriteFreely is **up to date**." + +# app-updates.tmlp 27 +msgid "Get" +msgstr "Get" + +# app-updates.tmlp 27 +msgid "A new version of WriteFreely is available! **%s %s**" +msgstr "A new version of WriteFreely is available! **%s %s**" + +# app-updates.tmlp 28 +msgid "release notes" +msgstr "release notes" + +# app-updates.tmlp 29 +msgid "Read the %s for details on features, bug fixes, and notes on upgrading from your current version, **%s**." +msgstr "Read the %s for details on features, bug fixes, and notes on upgrading from your current version, **%s**." + +# app-updates.tmlp 31 +msgid "Check now" +msgstr "Check now" + +# app-updates.tmlp 31 +msgid "Last checked" +msgstr "Last checked" + +# app-updates.tmlp 40 +msgid "Automated update checks are disabled." +msgstr "Automated update checks are disabled." + +# ADMIN PAGES +# view-page.tmpl 45 +msgid "Banner" +msgstr "Banner" + +# view-page.tmpl 56 +msgid "Body" +msgstr "Body" + +# view-page.tmpl 33 +msgid "Outline your %s." +msgstr "Outline your %s." + +# view-page.tmpl 35,37 +msgid "Customize your %s page." +msgstr "Customize your %s page." + +# view-page.tmpl 31 +msgid "Describe what your instance is %s." +msgstr "Describe what your instance is %s." + +msgid "Accepts Markdown and HTML." +msgstr "Accepts Markdown and HTML." + +# view-page.tmpl 56 +msgid "Content" +msgstr "Content" + +# view-page.tmpl 63 +msgid "Save" +msgstr "Save" + +# view-page.tmpl 71 +msgid "Saving..." +msgstr "Saving..." + +# view-page.tmpl 48 +msgid "We suggest a header (e.g. `# Welcome`), optionally followed by a small bit of text. Accepts Markdown and HTML." +msgstr "We suggest a header (e.g. `# Welcome`), optionally followed by a small bit of text. Accepts Markdown and HTML." + +# login.tmpl 11 +msgid "Log in to %s" +msgstr "Log in to %s" + +# login.tmpl 32 +msgid "Logging in..." +msgstr "Logging in..." + +# login.tmpl 27 +msgid "_No account yet?_ %s to start a blog." +msgstr "_No account yet?_ %s to start a blog." + +msgid "Incorrect password." +msgstr "Incorrect password." + +msgid "This user never set a password. Perhaps try logging in via OAuth?" +msgstr "This user never set a password. Perhaps try logging in via OAuth?" + +msgid "This user never added a password or email address. Please contact us for help." +msgstr "This user never added a password or email address. Please contact us for help." + +msgid "You're doing that too much." +msgstr "You're doing that too much." + +msgid "Parameter `alias` required." +msgstr "Parameter `alias` required." + +msgid "A username is required." +msgstr "A username is required." + +msgid "Parameter `pass` required." +msgstr "Parameter `pass` required." + +msgid "A password is required." +msgstr "A password is required." + +msgid "Need a collection `alias` to read." +msgstr "Need a collection `alias` to read." + +msgid "Please supply a password." +msgstr "Please supply a password." + +msgid "Something went very wrong. The humans have been alerted." +msgstr "Something went very wrong. The humans have been alerted." + +msgid "Logging out failed. Try clearing cookies for this site, instead." +msgstr "Logging out failed. Try clearing cookies for this site, instead." + +# signup-oauth.tmpl 88 +# landing.tmpl 95,197 +msgid "your-username" +msgstr "your-username" + +# signup.tmpl 91 +# landing.tmpl 103 +msgid "optional" +msgstr "optional" + +# signup.tmpl 95 +# landing.tmpl 107 +msgid "Create blog" +msgstr "Create blog" + +# signup-oauth.tmpl 59 +msgid "Finish creating account" +msgstr "Finish creating account" + +# signup-oauth.tmpl 79 +msgid "Display Name" +msgstr "Display Name" + +# oauth.tmpl 26 +msgid "or" +msgstr "or" + +# oauth.tmpl 9,13,17,20 +msgid "Sign in with **%s**" +msgstr "Sign in with **%s**" + +# landing.tmpl 77 +msgid "Learn more..." +msgstr "Learn more..." + +# landing.tmpl 114 +msgid "Registration is currently closed." +msgstr "Registration is currently closed." + +# landing.tmpl 115 +msgid "another instance" +msgstr "another instance" + +# landing.tmpl 115 +msgid "You can always sign up on %s." +msgstr "You can always sign up on %s." + +msgid "# Start your blog" +msgstr "# Start your blog" + +msgid "# Start your blog in the fediverse" +msgstr "# Start your blog in the fediverse" + +msgid "" +"## Write More Socially\n" +"\n" +"WriteFreely can communicate with other federated platforms like _Mastodon_, so people can follow your blogs, bookmark their favorite posts, and boost them to their followers. Sign up above to create a blog and join the fediverse." +msgstr "" +"## Write More Socially\n" +"\n" +"WriteFreely can communicate with other federated platforms like _Mastodon_, so people can follow your blogs, bookmark their favorite posts, and boost them to their followers. Sign up above to create a blog and join the fediverse." + +msgid "About %s" +msgstr "About %s" + +msgid "_%s_ is a place for you to write and publish, powered by %s." +msgstr "_%s_ is a place for you to write and publish, powered by %s." + +msgid "_%s_ is an interconnected place for you to write and publish, powered by %s." +msgstr "_%s_ is an interconnected place for you to write and publish, powered by %s." + +msgid "_%s_ is home to %d articles across %d blogs." +msgstr "_%s_ is home to %d articles across %d blogs." + +msgid "" +"## About WriteFreely\n" +"\n" +"%s is a self-hosted, decentralized blogging platform for publishing beautiful, simple blogs.\n" +"\n" +"It lets you publish a single blog, or host a community of writers who can create multiple blogs under one account. You can also enable federation, which allows people in the fediverse to follow your blog, bookmark your posts, and share them with others." +msgstr "" +"## About WriteFreely\n" +"\n" +"%s is a self-hosted, decentralized blogging platform for publishing beautiful, simple blogs.\n" +"\n" +"It lets you publish a single blog, or host a community of writers who can create multiple blogs under one account. You can also enable federation, which allows people in the fediverse to follow your blog, bookmark your posts, and share them with others." + +msgid "Start an instance" +msgstr "Start an instance" + +msgid "Privacy Policy" +msgstr "Privacy Policy" + +# privacy.tmpl 6 +msgid "Last updated" +msgstr "Last updated" + +msgid "Read the latest posts form %s." +msgstr "Read the latest posts form %s." + +# : pages.go:98 +msgid "" +"%s, the software that powers this site, is built to enforce your right to privacy by default.\n" +"\n" +"It retains as little data about you as possible, not even requiring an email address to sign up. However, if you _do_ give us your email address, it is stored encrypted in our database.\n" +"\n" +"We salt and hash your account's password.We store log files, or data about what happens on our servers. We also use cookies to keep you logged in to your account.\n" +"\n" +"Beyond this, it's important that you trust whoever runs %s. Software can only do so much to protect you -- your level of privacy protections will ultimately fall on the humans that run this particular service." +msgstr "" +"%s, the software that powers this site, is built to enforce your right to privacy by default.\n" +"\n" +"It retains as little data about you as possible, not even requiring an email address to sign up. However, if you _do_ give us your email address, it is stored encrypted in our database.\n" +"\n" +"We salt and hash your account's password.We store log files, or data about what happens on our servers. We also use cookies to keep you logged in to your account.\n" +"\n" +"Beyond this, it's important that you trust whoever runs %s. Software can only do so much to protect you -- your level of privacy protections will ultimately fall on the humans that run this particular service." + +# static/js/postactions.js +msgid "Unpublished post" +msgstr "Unpublished post" + +msgid "Moved to %s" +msgstr "Moved to %s" + +msgid "move to" +msgstr "move to" + +msgid "moving to %s..." +msgstr "moving to %s..." + +msgid "unable to move" +msgstr "unable to move" + +msgid "View on %s" +msgstr "View on %s" + +# classic.tmpl 64 +# pad.tmpl 59 +# bare.tmpl 30 +msgid "NOTE" +msgstr "NOTE" + +# classic.tmpl 64 +# pad.tmpl 59 +# bare.tmpl 30 +msgid "for now, you'll need Javascript enabled to post." +msgstr "for now, you'll need Javascript enabled to post." + +# classic.tmpl 158 +# pad.tmpl 174 +msgid "Your account is silenced, so you can't publish or update posts." +msgstr "Your account is silenced, so you can't publish or update posts." + +# classic.tmpl 257 +# pad.tmpl 278 +msgid "Failed to post. Please try again." +msgstr "Failed to post. Please try again." + +# classic.tmpl 163 +# pad.tmpl 179 +# bare.tmpl 99 +msgid "You don't have permission to update this post." +msgstr "You don't have permission to update this post." + +# pad.tmpl 16 +msgid "Write..." +msgstr "Write..." + +# classic.tmpl 34 +# pad.tmpl 29 +msgid "Publish to..." +msgstr "Publish to..." + +# classic.tmpl 55 +# pad.tmpl 50 +msgid "Font" +msgstr "Font" + +# read.tmpl 105 +msgid "from" +msgstr "from" + +# read.tmpl 105 +msgid "Anonymous" +msgstr "Anonymous" + +# read.tmpl 120 +msgid "Older" +msgstr "Older" + +# read.tmpl 121 +msgid "Newer" +msgstr "Newer" + +# password-collection.tmpl 31 +msgid "Menu" +msgstr "Menu" + +# password-collection.tmpl 51 +msgid "This blog requires a password." +msgstr "This blog requires a password." + +# 404-general.tmpl 1 +msgid "Page not found" +msgstr "Page not found" + +# 404-general.tmpl 4 +msgid "This page is missing." +msgstr "This page is missing." + +# 404-general.tmpl 5 +msgid "Are you sure it was ever here?" +msgstr "Are you sure it was ever here?" + +#404.tmpl 1,4 +msgid "Post not found" +msgstr "Post not found" + +#404.tmpl +msgid "Why not share a thought of your own?" +msgstr "Why not share a thought of your own?" + +# 404.tmpl +msgid "Start a blog" +msgstr "Start a blog" + +#404.tmpl +msgid "%s and spread your ideas on **%s**, %s." +msgstr "%s and spread your ideas on **%s**, %s." + +# 404.tmpl +msgid "a simple blogging community" +msgstr "a simple blogging community" + +# 404.tmpl +msgid "a simple, federated blogging community" +msgstr "a simple, federated blogging community" + +# 410.tmpl 1 +msgid "Unpublished" +msgst "Unpublished" + +# 410.tmpl 4 +msgid "Post was unpublished by the author." +msgstr "Post was unpublished by the author." + +# 410.tmpl 5 +msgid "It might be back some day." +msgstr "It might be back some day." diff --git a/locales/en_UK/LC_MESSAGES/base.mo b/locales/en_UK/LC_MESSAGES/base.mo new file mode 100644 index 0000000..45475d0 Binary files /dev/null and b/locales/en_UK/LC_MESSAGES/base.mo differ diff --git a/locales/en_UK/LC_MESSAGES/base.po b/locales/en_UK/LC_MESSAGES/base.po new file mode 100644 index 0000000..e34afb3 --- /dev/null +++ b/locales/en_UK/LC_MESSAGES/base.po @@ -0,0 +1,1581 @@ +msgid "" +msgstr "" +"Project-Id-Version: GOtext\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: Aitzol Berasategi \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" +"X-Generator: Poedit 2.4.2\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +# base.tmpl 40 +# header.tmpl 49 +# pages.tmpl 21 +msgid "Home" +msgstr "Home" + +# base.tmpl 42 +# header.tmpl 51 +# footer.tmpl 8,26 +# user/include/footer.tmpl 11 +msgid "About" +msgstr "About" + +# base.tmpl 49 +# header.tmpl 58,65 +# footer.tmpl 9,27 +# user/include/footer.tmpl 12 +# app-settings.tmpl 108 +# pages.tmpl 24 +msgid "Reader" +msgstr "Reader" + +# login.tmpl 21 +# password-collection.tmpl 33 +# base.tmpl 51 +# header.tmpl 60 +msgid "Log in" +msgstr "Log in" + +# classic.tmpl 48 +# collection.tmpl 63,74 +# pad.tmpl 43 +# base.tmpl 33,51 +# header.tmpl 14,41,60 +msgid "Log out" +msgstr "Log out" + +# base.tmpl 45 +# export.tmpl 19 +# collections.tmpl 13 +# user/collection.tmpl 105 +# admin.tmpl 59 +# nav.tmpl 2 +# header.tmpl 54,63 +# view-user 106 +msgid "Blog" +msgid_plural "Blogs" +msgstr[0] "Blog" +msgstr[1] "Blogs" + +# bare.tmpl 33 +# export.tmpl 19 +# admin.tmpl 60 +# view-user 132 +msgid "Post" +msgid_plural "Posts" +msgstr[0] "Post" +msgstr[1] "Posts" + +# bare.tmpl 26 +# header.tmpl 55 +msgid "My Posts" +msgstr "My Posts" + +# classic.tmpl 38 +# edit-meta.tmpl 43 +# pad.tmpl 26,27,33 +# post.tmpl 47 +# base.tmpl 47 +# bare.tmpl 26 +# stats.tmpl 55 +# import.tmpl 41 +# articles.tmpl 25 +# header.tmpl 21,56,64 +# posts.tmpl 23,30,50,57 +msgid "Draft" +msgid_plural "Drafts" +msgstr[0] "Draft" +msgstr[1] "Drafts" + +# login.tmpl 27 +# base.tmpl 50 +# header.tmpl 59 +msgid "Sign up" +msgstr "Sign up" + +# classic.tmpl 5 +# collection.tmpl 53 +# pad.tmpl 5 +# base.tmpl 55 +# nav.tmpl 9 +# header.tmpl 25,71 +msgid "New Post" +msgstr "New Post" + +# header.tmpl 29 +msgid "Return to editor" +msgstr "Return to editor" + +# footer.tmpl 10,14,34 +# user/include/footer.tmpl 13 +msgid "writer's guide" +msgstr "writer's guide" + +# footer.tmpl 15,35 +msgid "developers" +msgstr "developers" + +# footer.tmpl 11,28 +# user/include/footer.tmpl 14 +msgid "privacy" +msgstr "privacy" + +# footer.tmpl 16,36 +msgid "source code" +msgstr "source code" + +# base.tmpl 28 +# header.tmpl 9,35 +msgid "Admin dashboard" +msgstr "Admin dashboard" + +# base.tmpl 29 +# header.tmpl 10,36 +msgid "Account settings" +msgstr "Account settings" + +# import.tmpl 17 +# header.tmpl 11,37 +msgid "Import posts" +msgstr "Import posts" + +# base.tmpl 30 +# export.tmpl 5,10 +# header.tmpl 12,38 +msgid "Export" +msgstr "Export" + +# header.tmpl 103 +msgid "Dashboard" +msgstr "Dashboard" + +# header.tmpl 104 +msgid "Settings" +msgstr "Settings" + +# export.tmpl 19 +# admin.tmpl 58 +# header.tmpl 106 +# view-user.tmpl 59 +# users.tmpl 15,21,30 +msgid "User" +msgid_plural "Users" +msgstr[0] "User" +msgstr[1] "Users" + +# header.tmpl 107 +# pages.tmpl 13, 17 +msgid "Page" +msgid_plural "Pages" +msgstr[0] "Page" +msgstr[1] "Pages" + +# post.tmpl 41 +# posts.tmpl 11,43,64,66 +# view-user 128 +msgid "View" +msgid_plural "Views" +msgstr[0] "View" +msgstr[1] "Views" + +# posts.tmpl 11,43,64,66 +# view-user 128 +# edit-meta.tmpl 49,55 +# pad.tmpl 63 +msgid "View post" +msgid_plural "View posts" +msgstr[0] "View post" +msgstr[1] "View posts" + +# classic.tmpl 41,45 +# collection.tmpl 57 +# header.tmpl 7 +# edit-meta.tmpl 41 +# pad.tmpl 24,36,40 +# nav.tmpl 12 +msgid "View Blog" +msgid_plural "View Blogs" +msgstr[0] "View Blog" +msgstr[1] "View Blogs" + +# classic.tmpl 62 +# pad.tmpl 124 +msgid "word" +msgid_plural "words" +msgstr[0] "word" +msgstr[1] "words" + +# pad.tmpl 64 +msgid "Publish" +msgstr "Publish" + +# pad.tmpl 20 +# bare.tmpl 20 +msgid "This post has been updated elsewhere since you last published!" +msgstr "This post has been updated elsewhere since you last published!" + +# pad.tmpl 20 +# bare.tmpl 20 +msgid "Delete draft and reload" +msgstr "Delete draft and reload" + +msgid "Updates" +msgstr "Updates" + +# classic.tmpl 42 +# pad.tmpl 37 +# user/collection.tmpl 32 +# collection.tmpl 54 +# nav.tmpl 10 +# header.tmpl 19 +msgid "Customize" +msgstr "Customize" + +# classic.tmpl 43 +# collection.tmpl 55 +# pad.tmpl 38 +# stats.tmpl 26 +# nav.tmpl 11 +# header.tmpl 20 +msgid "Stats" +msgstr "Stats" + +# classic.tmpl 47 +# collection.tmpl 58 +# pad.tmpl 42 +msgid "View Draft" +msgid_plural "View Drafts" +msgstr[0] "View Draft" +msgstr[1] "View Drafts" + +# header.tmpl 111 +msgid "Monitor" +msgstr "Monitor" + +# read.tmpl 108,110 +msgid "Read more..." +msgstr "Read more..." + +# silenced.tmpl 3 +msgid "Your account has been silenced." +msgstr "Your account has been silenced." + +# silenced.tmpl 3 +msgid "You can still access all of your posts and blogs, but no one else can currently see them." +msgstr "You can still access all of your posts and blogs, but no one else can currently see them." + +# articles.tmpl 28 +msgid "These are your draft posts. You can share them individually (without a blog) or move them to your blog when you're ready." +msgstr "These are your draft posts. You can share them individually (without a blog) or move them to your blog when you're ready." + +# articles.tmpl 57 +msgid "Your anonymous and draft posts will show up here once you've published some. You'll be able to share them individually (without a blog) or move them to a blog when you're ready." +msgstr "Your anonymous and draft posts will show up here once you've published some. You'll be able to share them individually (without a blog) or move them to a blog when you're ready." + +# articles.tmpl 58 +msgid "Alternatively, see your blogs and their posts on your %s page." +msgstr "Alternatively, see your blogs and their posts on your %s page." + +# articles.tmpl 60 +msgid "Start writing" +msgstr "Start writing" + +# articles.tmpl 64 +# static/js/postactions.jsmsgid "unsynced posts" +msgstr "unsynced posts" + +# articles.tmpl 64 +# collection.tmpl 43 +# view-page.tmpl 51 +# view-user 116 +msgid "Title" +msgstr "Title" + +# user/collection.tmpl 44 +# view-user 120 +msgid "Description" +msgstr "Description" + +# user/collection.tmpl 50 +msgid "This blog uses your username in its URL." +msgstr "This blog uses your username in its URL." + +# user/collection.tmpl 50 +msgid "This blog uses your username in its URL and fediverse handle." +msgstr "This blog uses your username in its URL and fediverse handle." + +# user/collection.tmpl 50 +msgid "You can change it in your %s." +msgstr "You can change it in your %s." + +# user/collection.tmpl 63 +msgid "Publicity" +msgstr "Publicity" + +# user/collection.tmpl 68 +# app-settings.tmpl 120 +msgid "Unlisted" +msgstr "Unlisted" + +# user/collection.tmpl 87 +# app-settings.tmpl 121 +msgid "Public" +msgstr "Public" + +# user/collection.tmpl 74 +# app-settings.tmpl 122 +msgid "Private" +msgstr "Private" + +# user/collection.tmpl 70 +msgid "This blog is visible to any registered user on this instance." +msgstr "This blog is visible to any registered user on this instance." + +# user/collection.tmpl 70 +msgid "This blog is visible to anyone with its link." +msgstr "This blog is visible to anyone with its link." + +# user/collection.tmpl 76 +msgid "Only you may read this blog (while you're logged in)." +msgstr "Only you may read this blog (while you're logged in)." + +# user/collection.tmpl 80 +msgid "Password-protected:" +msgstr "Password-protected:" + +# user/collection.tmpl 80 +msgid "a memorable password" +msgstr "a memorable password" + +# user/collection.tmpl 82 +msgid "A password is required to read this blog." +msgstr "A password is required to read this blog." + +# user/collection.tmpl 89 +msgid "This blog is displayed on the public %s, and is visible to anyone with its link." +msgstr "This blog is displayed on the public %s, and is visible to anyone with its link." + +# user/collection.tmpl 89 +msgid "This blog is displayed on the public %s, and is visible to any registered user on this instance." +msgstr "This blog is displayed on the public %s, and is visible to any registered user on this instance." + +# user/collection.tmpl 90 +msgid "The public reader is currently turned off for this community." +msgstr "The public reader is currently turned off for this community." + +# user/collection.tmpl 98 +msgid "Display Format" +msgstr "Display Format" + +# user/collection.tmpl 100 +msgid "Customize how your posts display on your page." +msgstr "Customize how your posts display on your page." + +# user/collection.tmpl 107 +msgid "Dates are shown. Latest posts listed first." +msgstr "Dates are shown. Latest posts listed first." + +# user/collection.tmpl 113 +msgid "No dates shown. Oldest posts first." +msgstr "No dates shown. Oldest posts first." + +# user/collection.tmpl 119 +msgid "No dates shown. Latest posts first." +msgstr "No dates shown. Latest posts first." + +# user/collection.tmpl 126 +msgid "Text Rendering" +msgstr "Text Rendering" + +# user/collection.tmpl 128 +msgid "Customize how plain text renders on your blog." +msgstr "Customize how plain text renders on your blog." + +# user/collection.tmpl 145 +msgid "Custom CSS" +msgstr "Custom CSS" + +# user/collection.tmpl 148 +msgid "customization" +msgstr "customization" + +# user/collection.tmpl 148 +msgid "See our guide on %s." +msgstr "See our guide on %s." + +# user/collection.tmpl 153 +msgid "Post Signature" +msgstr "Post Signature" + +# user/collection.tmpl 155 +msgid "This content will be added to the end of every post on this blog, as if it were part of the post itself. Markdown, HTML, and shortcodes are allowed." +msgstr "This content will be added to the end of every post on this blog, as if it were part of the post itself. Markdown, HTML, and shortcodes are allowed." + +# user/collection.tmpl 162 +msgid "Web Monetization" +msgstr "Web Monetization" + +# user/collection.tmpl 164 +msgid "Web Monetization enables you to receive micropayments from readers that have a %s. Add your payment pointer to enable Web Monetization on your blog." +msgstr "Web Monetization enables you to receive micropayments from readers that have a %s. Add your payment pointer to enable Web Monetization on your blog." + +# user/collection.tmpl 164 +msgid "Coil membership" +msgstr "Coil membership" + +# edit-meta.tmpl 263 +# settings.tmpl 81 +# user/collection.tmpl 171 +msgid "Save changes" +msgstr "Save changes" + +# user/collection.tmpl 173 +msgid "Delete Blog..." +msgstr "Delete Blog..." + +# user/collection.tmpl 190,220 +# articles.tmpl 36 +# posts.tmpl 19,46 +msgid "Delete" +msgstr "Delete" + +# settings.tmpl 187 +# user/collection.tmpl 189 +# view-user 173 +msgid "Cancel" +msgstr "Cancel" + +# user/collection.tmpl 180 +msgid "Are you sure you want to delete this blog?" +msgstr "Are you sure you want to delete this blog?" + +# posts.js 46,147 +# collection.tmpl 148 +# collection-tags.tmpl 96 +# chorus-collection.tmpl 132 +msgid "Are you sure you want to delete this post?" +msgstr "Are you sure you want to delete this post?" + +# posts.js 302 +# collection.tmpl 175,226 +# collection-tags.tmpl 123,174 +# chorus-collection.tmpl 159,210 +msgid "Post is synced to another account. Delete the post from that account instead." +msgstr "Post is synced to another account. Delete the post from that account instead." + +# posts.js 308 +# collection.tmpl 181 +# collection-tags.tmpl 129 +# chorus-collection.tmpl 165 +msgid "Failed to delete." +msgstr "Failed to delete." + +# posts.js 308 +# collection.tmpl 181 +# collection-tags.tmpl 129 +# chorus-collection.tmpl 165 +msgid "Please try again." +msgstr "Please try again." + +# user/collection.tmpl 182 +msgid "This will permanently erase **%s** (%s/%s) from the internet. Any posts on this blog will be saved and made into drafts (found on your %s page)." +msgstr "This will permanently erase **%s** (%s/%s) from the internet. Any posts on this blog will be saved and made into drafts (found on your %s page)." + +# user/collection.tmpl 183 +msgid "If you're sure you want to delete this blog, enter its name in the box below and press **%s**." +msgstr "If you're sure you want to delete this blog, enter its name in the box below and press **%s**." + +# user/collection.tmpl 202 +msgid "Enter **%s** in the box below." +msgstr "Enter **%s** in the box below." + +# user/collection.tmpl 238 +msgid "Saving changes..." +msgstr "Saving changes..." + +# collections.tmpl 72,75,84 +msgid "This name is taken." +msgstr "This name is taken." + +# pad.tmpl 61 +msgid "Edit post metadata" +msgstr "Edit post metadata" + +# edit-meta.tmpl 5,55 +msgid "Edit metadata" +msgstr "Edit metadata" + +# edit-meta.tmpl 260 +msgid "now" +msgstr "now" + +# edit-meta.tmpl 63 +msgid "Slug" +msgstr "Slug" + +# edit-meta.tmpl 66 +msgid "Language" +msgstr "Language" + +# edit-meta.tmpl 256 +msgid "Direction" +msgstr "Direction" + +# edit-meta.tmpl 258 +msgid "Created" +msgstr "Created" + +# edit-meta.tmpl 257 +msgid "right-to-left" +msgstr "right-to-left" + +# edit-meta.tmpl 47 +msgid "Edit post" +msgstr "Edit post" + +# edit-meta.tmpl 48 +# pad.tmpl 62 +msgid "Toggle theme" +msgstr "Toggle theme" + +# collection-post.tmpl 66 +# posts.tmpl 8 +msgid "Scheduled" +msgstr "Scheduled" + +# collection-post.tmpl 57 +# post.tmpl 45,91 +# articles.tmpl 35 +# posts.tmpl 17,44 +msgid "Edit" +msgstr "Edit" + +# posts.tmpl 18,45 +msgid "Pin" +msgstr "Pin" + +# collection-post.tmpl 58 +msgid "Unpin" +msgstr "Unpin" + +# posts.tmpl 21,48 +msgid "Move this post to another blog" +msgstr "Move this post to another blog" + +# posts.tmpl 30,57 +msgid "Change to a draft" +msgstr "Change to a draft" + +# posts.tmpl 30,57 +msgid "change to _%s_" +msgstr "change to _%s_" + +# articles.tmpl 43,78 +# posts.tmpl 26,53 +msgid "move to..." +msgstr "move to..." + +# articles.tmpl 47,83 +msgid "move to %s" +msgstr "move to %s" + +# post.tmpl 42 +msgid "View raw" +msgstr "View raw" + +# articles.tmpl 47,83 +msgid "Publish this post to your blog %s" +msgstr "Publish this post to your blog %s" + +# articles.tmpl 39,74 +msgid "Move this post to one of your blogs" +msgstr "Move this post to one of your blogs" + +# articles.tmpl 55 +msgid "Load more..." +msgstr "Load more..." + +# stats.tmpl 32 +msgid "Stats for all time." +msgstr "Stats for all time." + +# stats.tmpl 35 +msgid "Fediverse stats" +msgstr "Fediverse stats" + +# stats.tmpl 38 +msgid "Followers" +msgstr "Followers" + +# stats.tmpl 46 +msgid "Top %d post" +msgid_plural "Top %d posts" +msgstr[0] "Top %d post" +msgstr[1] "Top %d posts" + +# stats.tmpl 51 +msgid "Total Views" +msgstr "Total Views" + +# settings.tmpl 27 +msgid "Before you go..." +msgstr "Before you go..." + +# settings.tmpl 27 +msgid "Account Settings" +msgstr "Account Settings" + +# settings.tmpl 38 +msgid "Change your account settings here." +msgstr "Change your account settings here." + +# signup.tmpl 80 +# signup-oauth.tmpl 85,87 +# login.tmpl 21 +# landing.tmpl 92 +# settings.tmpl 43 +# view-user.tmpl 62 +msgid "Username" +msgstr "Username" + +# settings.tmpl 46 +msgid "Update" +msgstr "Update" + +# settings.tmpl 56 +msgid "Passphrase" +msgstr "Passphrase" + +# settings.tmpl 58 +msgid "Add a passphrase to easily log in to your account." +msgstr "Add a passphrase to easily log in to your account." + +# settings.tmpl 59,60 +msgid "Current passphrase" +msgstr "Current passphrase" + +# settings.tmpl 61,64 +msgid "New passphrase" +msgstr "New passphrase" + +# settings.tmpl 60,64 +msgid "Show" +msgstr "Show" + +msgid "Account updated." +msgstr "Account updated." + +# signup.tmpl 91 +# signup-oauth.tmpl 92,94 +# landing.tmpl 103 +# settings.tmpl 69 +msgid "Email" +msgstr "Email" + +# settings.tmpl 76 +msgid "Email address" +msgstr "Email address" + +# settings.tmpl 71 +msgid "Add your email to get:" +msgstr "Add your email to get:" + +# settings.tmpl 34 +msgid "Please add an **%s** and/or **%s** so you can log in again later." +msgstr "Please add an **%s** and/or **%s** so you can log in again later." + +# settings.tmpl 73 +msgid "No-passphrase login" +msgstr "No-passphrase login" + +# settings.tmpl 74 +msgid "Account recovery if you forget your passphrase" +msgstr "Account recovery if you forget your passphrase" + +# settings.tmpl 89 +msgid "Linked Accounts" +msgstr "Linked Accounts" + +# settings.tmpl 90 +msgid "These are your linked external accounts." +msgstr "These are your linked external accounts." + +# settings.tmpl 114 +msgid "Link External Accounts" +msgstr "Link External Accounts" + +msgid "Connect additional accounts to enable logging in with those providers, instead of using your username and password." +msgstr "Connect additional accounts to enable logging in with those providers, instead of using your username and password." + +# settings.tmpl 162 +# view-user 149 +msgid "Incinerator" +msgstr "Incinerator" + +# settings.tmpl 166,169,188 +msgid "Delete your account" +msgstr "Delete your account" + +# settings.tmpl 167 +msgid "Permanently erase all your data, with no way to recover it." +msgstr "Permanently erase all your data, with no way to recover it." + +# settings.tmpl 176 +# view-user 163 +msgid "Are you sure?" +msgstr "Are you sure?" + +# settings.tmpl 178 +msgid "export your data" +msgstr "export your data" + +# settings.tmpl 178 +msgid "This action **cannot** be undone. It will immediately and permanently erase your account, including your blogs and posts. Before continuing, you might want to %s." +msgstr "This action **cannot** be undone. It will immediately and permanently erase your account, including your blogs and posts. Before continuing, you might want to %s." + +# settings.tmpl 179 +msgid "If you're sure, please type **%s** to confirm." +msgstr "If you're sure, please type **%s** to confirm." + +# invite-help.tmpl 13 +msgid "Invite to %s" +msgstr "Invite to %s" + +# invite-help.tmpl 15 +msgid "This invite link is expired." +msgstr "This invite link is expired." + +# invite-help.tmpl 21 +msgid "Only **one** user" +msgstr "Only **one** user" + +# invite-help.tmpl 21 +msgid "Up to **%d** users" +msgstr "Up to **%d** users" + +# invite-help.tmpl 21 +msgid "can sign up with this link." +msgstr "can sign up with this link." + +# invite-help.tmpl 23 +msgid "It expires on **%s**." +msgstr "It expires on **%s**." + +# invite-help.tmpl 25 +msgid "It can be used as many times as you like" +msgstr "It can be used as many times as you like" + +# invite-help 25 +msgid "before **%s**, when it expires" +msgstr "before **%s**, when it expires" + +msgid "person has" +msgid_plural "person have" +msgstr[0] "person has" +msgstr[1] "person have" + +# invite-help.tmpl 21 +msgid "So far, **%d** %s used it." +msgstr "So far, **%d** %s used it." + +# invite-help.tmpl 17 +msgid "Copy the link below and send it to anyone that you want to join *%s*. You could paste it into an email, instant message, text message, or write it down on paper. Anyone who navigates to this special page will be able to create an account." +msgstr "Copy the link below and send it to anyone that you want to join *%s*. You could paste it into an email, instant message, text message, or write it down on paper. Anyone who navigates to this special page will be able to create an account." + +# IMPORT PAGE +# import.tmpl 28 +msgid "Publish plain text or Markdown files to your account by uploading them below." +msgstr "Publish plain text or Markdown files to your account by uploading them below." + +# import.tmpl 31 +msgid "Select some files to import:" +msgstr "Select some files to import:" + +# import.tmpl 36 +msgid "Import these posts to:" +msgstr "Import these posts to:" + +# import.tmpl 59 +msgid "Import" +msgstr "Import" + +msgid "Import complete, %d post imported." +msgid_plural "Import complete, %d posts imported." +msgstr[0] "Import complete, %d post imported." +msgstr[1] "Import complete, %d posts imported." + +msgid "%d of %d posts imported, see details below." +msgid_plural "%d of %d posts imported, see details below." +msgstr[0] "%d of %d posts imported, see details below." +msgstr[1] "%d of %d posts imported, see details below." + +msgid "%s is not a supported post file" +msgstr "%s is not a supported post file" + +# export.tmpl 6 +msgid "Your data on %s is always free. Download and back-up your work any time." +msgstr "Your data on %s is always free. Download and back-up your work any time." + +# export.tmpl 11 +msgid "Format" +msgstr "Format" + +# header.tmpl 101 +msgid "Admin" +msgstr "Admin" + +# app-settings.tmpl 37 +msgid "Site Title" +msgstr "Site Title" + +# app-settings.tmpl 38 +msgid "Your public site name." +msgstr "Your public site name." + +# app-settings.tmpl 44 +msgid "Site Description" +msgstr "Site Description" + +# app-settings.tmpl 45 +msgid "Describe your site — this shows in your site's metadata." +msgstr "Describe your site — this shows in your site's metadata." + +# app-settings.tmpl 51 +msgid "Host" +msgstr "Host" + +# app-settings.tmpl 52 +msgid "The public address where users will access your site, starting with `http://` or `https://`." +msgstr "The public address where users will access your site, starting with `http://` or `https://`." + +# app-settings.tmpl 58 +msgid "Community Mode" +msgstr "Community Mode" + +# app-settings.tmpl 59 +msgid "Whether your site is made for one person or many." +msgstr "Whether your site is made for one person or many." + +# app-settings.tmpl 61 +msgid "Single user" +msgstr "Single user" + +# app-settings.tmpl 61 +msgid "Multiple users" +msgstr "Multiple users" + +# app-settings.tmpl 65 +msgid "Landing Page" +msgstr "Landing Page" + +# app-settings.tmpl 66 +msgid "The page that logged-out visitors will see first. This should be an absolute path like: `/read`." +msgstr "The page that logged-out visitors will see first. This should be an absolute path like: `/read`." + +# app-settings.tmpl 72 +msgid "Open Registrations" +msgstr "Open Registrations" + +# app-settings.tmpl 73 +msgid "Allow anyone who visits the site to create an account." +msgstr "Allow anyone who visits the site to create an account." + +# app-settings.tmpl 80 +msgid "Allow account deletion" +msgstr "Allow account deletion" + +# app-settings.tmpl 81 +msgid "Allow all users to delete their account. Admins can always delete users." +msgstr "Allow all users to delete their account. Admins can always delete users." + +# app-settings.tmpl 88 +msgid "Allow invitations from..." +msgstr "Allow invitations from..." + +# app-settings.tmpl 89 +msgid "Choose who is allowed to invite new people." +msgstr "Choose who is allowed to invite new people." + +# app-settings.tmpl 93 +msgid "No one" +msgstr "No one" + +# app-settings.tmpl 94 +msgid "Only Admins" +msgstr "Only Admins" + +# app-settings.tmpl 95 +msgid "All Users" +msgstr "All Users" + +# app-settings.tmpl 101 +msgid "Private Instance" +msgstr "Private Instance" + +# app-settings.tmpl 102 +msgid "Limit site access to people with an account." +msgstr "Limit site access to people with an account." + +# app-settings.tmpl 109 +msgid "Show a feed of user posts for anyone who chooses to share there." +msgstr "Show a feed of user posts for anyone who chooses to share there." + +# app-settings.tmpl 115 +msgid "Default blog visibility" +msgstr "Default blog visibility" + +# app-settings.tmpl 116 +msgid "The default setting for new accounts and blogs." +msgstr "The default setting for new accounts and blogs." + +# app-settings.tmpl 128 +msgid "Maximum Blogs per User" +msgstr "Maximum Blogs per User" + +# app-settings.tmpl 129 +msgid "Keep things simple by setting this to **1**, unlimited by setting to **0**, or pick another amount." +msgstr "Keep things simple by setting this to **1**, unlimited by setting to **0**, or pick another amount." + +# app-settings.tmpl 135 +msgid "Federation" +msgstr "Federation" + +# app-settings.tmpl 136 +msgid "Enable accounts on this site to propagate their posts via the ActivityPub protocol." +msgstr "Enable accounts on this site to propagate their posts via the ActivityPub protocol." + +# app-settings.tmpl 142 +msgid "Public Stats" +msgstr "Public Stats" + +# app-settings.tmpl 143 +msgid "Publicly display the number of users and posts on your **%s** page." +msgstr "Publicly display the number of users and posts on your **%s** page." + +# app-settings.tmpl 149 +msgid "Monetization" +msgstr "Monetization" + +# app-settings.tmpl 150 +msgid "Enable blogs on this site to receive micropayments from readers via %s." +msgstr "Enable blogs on this site to receive micropayments from readers via %s." + +# app-settings.tmpl 156 +msgid "Minimum Username Length" +msgstr "Minimum Username Length" + +# app-settings.tmpl 157 +msgid "The minimum number of characters allowed in a username. (Recommended: 2 or more.)" +msgstr "The minimum number of characters allowed in a username. (Recommended: 2 or more.)" + +# app-settings.tmpl 162 +msgid "Save Settings" +msgstr "Save Settings" + +# app-settings.tmpl 166 +msgid "configuration docs" +msgstr "configuration docs" + +# app-settings.tmpl 166 +msgid "Still have questions? Read more details in the %s." +msgstr "Still have questions? Read more details in the %s." + +msgid "Configuration saved." +msgstr "Configuration saved." + +# view-user.tmpl 66 +# users.tmpl 22 +msgid "joined" +msgstr "joined" + +# users.tmpl 23 +msgid "type" +msgstr "type" + +# users.tmpl 24 +# view-user.tmpl 79 +msgid "status" +msgstr "status" + +# base.tmpl 31 +# header.tmpl 39 +# invite.tmpl 26 +# users.tmpl 16 +msgid "Invite people" +msgstr "Invite people" + +# invite.tmpl 27 +msgid "Invite others to join *%s* by generating and sharing invite links below." +msgstr "Invite others to join *%s* by generating and sharing invite links below." + +# invite.tmpl 31 +msgid "Maximum number of uses:" +msgstr "Maximum number of uses:" + +# invite.tmpl 33 +msgid "No limit" +msgstr "No limit" + +# invite.tmpl 34,35,36,37,38,39,64 +msgid "use" +msgid_plural "uses" +msgstr[0] "use" +msgstr[1] "uses" + +# invite.tmpl 43 +msgid "Expire after:" +msgstr "Expire after:" + +# invite.tmpl 46 +msgid "minute" +msgid_plural "minutes" +msgstr[0] "minute" +msgstr[1] "minutes" + +# invite.tmpl 47,48,49 +msgid "hour" +msgid_plural "hours" +msgstr[0] "hour" +msgstr[1] "hours" + +# invite.tmpl 50,51 +msgid "day" +msgid_plural "days" +msgstr[0] "day" +msgstr[1] "days" + +# invite.tmpl 52 +msgid "week" +msgid_plural "weeks" +msgstr[0] "week" +msgstr[1] "weeks" + +# invite.tmpl 57 +msgid "You cannot generate invites while your account is silenced." +msgstr "You cannot generate invites while your account is silenced." + +# invite.tmpl 57 +msgid "Generate" +msgstr "Generate" + +# invite.tmpl 63 +msgid "Link" +msgstr "Link" + +# invite.tmpl 121,129,137,145,152 +msgid "ToLink" +msgstr "Link" + +# invite.tmpl 65 +msgid "Expires" +msgstr "Expires" + +# invite.tmpl 71 +msgid "Expired" +msgstr "Expired" + +# invite.tmpl 75 +msgid "No invites generated yet." +msgstr "No invites generated yet." + +# pages.tmpl 18 +msgid "last modified" +msgstr "last modified" + +# view-user.tmpl 85 +# users.tmpl 31 +msgid "Active" +msgstr "Active" + +# view-user.tmpl 82 +# users.tmpl 31 +msgid "Silenced" +msgstr "Silenced" + +# view-user.tmpl 83 +msgid "Unsilence" +msgstr "Unsilence" + +# view-user 86 +msgid "disabled" +msgstr "disabled" + +# view-user 86 +msgid "Silence" +msgstr "Silence" + +# view-user.tmpl 54 +msgid "No." +msgstr "No." + +# view-user.tmpl 70 +msgid "total posts" +msgstr "total posts" + +# view-user.tmpl 74,136 +msgid "last post" +msgstr "last post" + +# signup.tmpl 87 +# login.tmpl 22 +# landing.tmpl 99 +# view-user 92 +msgid "password" +msgstr "password" + +msgid "Change your password" +msgstr "Change your password" + +# view-user 100 +msgid "Go to reset password page" +msgstr "Go to reset password page" + +# view-user 141 +msgid "Fediverse followers" +msgstr "Fediverse followers" + +# view-user 124 +msgid "Visibility" +msgstr "Visibility" + +# view-user 112 +msgid "Alias" +msgstr "Alias" + +# view-user.tmpl 75,137 +msgid "Never" +msgstr "Never" + +# view-user 97 +msgid "Reset" +msgstr "Reset" + +# view-user 153,156,174 +msgid "Delete this user" +msgstr "Delete this user" + +# view-user 154 +msgid "Permanently erase all user data, with no way to recover it." +msgstr "Permanently erase all user data, with no way to recover it." + +# view-user 165 +msgid "This action **cannot**be undone. It will permanently erase all traces of this user, **%s**, including their account information, blogs, and posts." +msgstr "This action **cannot**be undone. It will permanently erase all traces of this user, **%s**, including their account information, blogs, and posts." + +# view-user 166 +msgid "Please type **%s** to confirm." +msgstr "Please type **%s** to confirm." + +# view-user 202 +msgid "Silence this user? They'll still be able to log in and access their posts, but no one else will be able to see them anymore. You can reverse this decision at any time." +msgstr "Silence this user? They'll still be able to log in and access their posts, but no one else will be able to see them anymore. You can reverse this decision at any time." + +# view-user 208 +msgid "Reset this user's password? This will generate a new temporary password that you'll need to share with them, and invalidate their old one." +msgstr "Reset this user's password? This will generate a new temporary password that you'll need to share with them, and invalidate their old one." + +# settings.tmpl 225 +# user/collection.tmpl 207 +# view-user.tmpl 198 +msgid "Deleting..." +msgstr "Deleting..." + +# view-user.tmpl 46 +msgid "This user's password has been reset to:" +msgstr "This user's password has been reset to:" + +# view-user.tmpl 48 +msgid "They can use this new password to log in to their account. **This will only be shown once**, so be sure to copy it and send it to them now." +msgstr "They can use this new password to log in to their account. **This will only be shown once**, so be sure to copy it and send it to them now." + +# view-user.tmpl 49 +msgid "Their email address is:" +msgstr "Their email address is:" + +# app-updates.tmlp 19 +msgid "Automated update check failed." +msgstr "Automated update check failed." + +# app-updates.tmlp 20, 24, 41 +msgid "Installed version: %s (%s)." +msgstr "Installed version: %s (%s)." + +# app-updates.tmlp 21, 42 +msgid "Learn about latest releases on the %s or %s." +msgstr "Learn about latest releases on the %s or %s." + +# app-updates.tmlp 23 +msgid "WriteFreely is **up to date**." +msgstr "WriteFreely is **up to date**." + +# app-updates.tmlp 27 +msgid "Get" +msgstr "Get" + +# app-updates.tmlp 27 +msgid "A new version of WriteFreely is available! **%s %s**" +msgstr "A new version of WriteFreely is available! **%s %s**" + +# app-updates.tmlp 28 +msgid "release notes" +msgstr "release notes" + +# app-updates.tmlp 29 +msgid "Read the %s for details on features, bug fixes, and notes on upgrading from your current version, **%s**." +msgstr "Read the %s for details on features, bug fixes, and notes on upgrading from your current version, **%s**." + +# app-updates.tmlp 31 +msgid "Check now" +msgstr "Check now" + +# app-updates.tmlp 31 +msgid "Last checked" +msgstr "Last checked" + +# app-updates.tmlp 40 +msgid "Automated update checks are disabled." +msgstr "Automated update checks are disabled." + +# ADMIN PAGES +# view-page.tmpl 45 +msgid "Banner" +msgstr "Banner" + +# view-page.tmpl 56 +msgid "Body" +msgstr "Body" + +# view-page.tmpl 33 +msgid "Outline your %s." +msgstr "Outline your %s." + +# view-page.tmpl 35,37 +msgid "Customize your %s page." +msgstr "Customize your %s page." + +# view-page.tmpl 31 +msgid "Describe what your instance is %s." +msgstr "Describe what your instance is %s." + +msgid "Accepts Markdown and HTML." +msgstr "Accepts Markdown and HTML." + +# view-page.tmpl 56 +msgid "Content" +msgstr "Content" + +# view-page.tmpl 63 +msgid "Save" +msgstr "Save" + +# view-page.tmpl 71 +msgid "Saving..." +msgstr "Saving..." + +# view-page.tmpl 48 +msgid "We suggest a header (e.g. `# Welcome`), optionally followed by a small bit of text. Accepts Markdown and HTML." +msgstr "We suggest a header (e.g. `# Welcome`), optionally followed by a small bit of text. Accepts Markdown and HTML." + +# login.tmpl 11 +msgid "Log in to %s" +msgstr "Log in to %s" + +# login.tmpl 32 +msgid "Logging in..." +msgstr "Logging in..." + +# login.tmpl 27 +msgid "_No account yet?_ %s to start a blog." +msgstr "_No account yet?_ %s to start a blog." + +msgid "Incorrect password." +msgstr "Incorrect password." + +msgid "This user never set a password. Perhaps try logging in via OAuth?" +msgstr "This user never set a password. Perhaps try logging in via OAuth?" + +msgid "This user never added a password or email address. Please contact us for help." +msgstr "This user never added a password or email address. Please contact us for help." + +msgid "You're doing that too much." +msgstr "You're doing that too much." + +msgid "Parameter `alias` required." +msgstr "Parameter `alias` required." + +msgid "A username is required." +msgstr "A username is required." + +msgid "Parameter `pass` required." +msgstr "Parameter `pass` required." + +msgid "A password is required." +msgstr "A password is required." + +msgid "Need a collection `alias` to read." +msgstr "Need a collection `alias` to read." + +msgid "Please supply a password." +msgstr "Please supply a password." + +msgid "Something went very wrong. The humans have been alerted." +msgstr "Something went very wrong. The humans have been alerted." + +msgid "Logging out failed. Try clearing cookies for this site, instead." +msgstr "Logging out failed. Try clearing cookies for this site, instead." + +# signup-oauth.tmpl 88 +# landing.tmpl 95,197 +msgid "your-username" +msgstr "your-username" + +# signup.tmpl 91 +# landing.tmpl 103 +msgid "optional" +msgstr "optional" + +# signup.tmpl 95 +# landing.tmpl 107 +msgid "Create blog" +msgstr "Create blog" + +# signup-oauth.tmpl 59 +msgid "Finish creating account" +msgstr "Finish creating account" + +# signup-oauth.tmpl 79 +msgid "Display Name" +msgstr "Display Name" + +# oauth.tmpl 26 +msgid "or" +msgstr "or" + +# oauth.tmpl 9,13,17,20 +msgid "Sign in with **%s**" +msgstr "Sign in with **%s**" + +# landing.tmpl 77 +msgid "Learn more..." +msgstr "Learn more..." + +# landing.tmpl 114 +msgid "Registration is currently closed." +msgstr "Registration is currently closed." + +# landing.tmpl 115 +msgid "another instance" +msgstr "another instance" + +# landing.tmpl 115 +msgid "You can always sign up on %s." +msgstr "You can always sign up on %s." + +msgid "# Start your blog" +msgstr "# Start your blog" + +msgid "# Start your blog in the fediverse" +msgstr "# Start your blog in the fediverse" + +msgid "" +"## Write More Socially\n" +"\n" +"WriteFreely can communicate with other federated platforms like _Mastodon_, so people can follow your blogs, bookmark their favorite posts, and boost them to their followers. Sign up above to create a blog and join the fediverse." +msgstr "" +"## Write More Socially\n" +"\n" +"WriteFreely can communicate with other federated platforms like _Mastodon_, so people can follow your blogs, bookmark their favorite posts, and boost them to their followers. Sign up above to create a blog and join the fediverse." + +msgid "About %s" +msgstr "About %s" + +msgid "_%s_ is a place for you to write and publish, powered by %s." +msgstr "_%s_ is a place for you to write and publish, powered by %s." + +msgid "_%s_ is an interconnected place for you to write and publish, powered by %s." +msgstr "_%s_ is an interconnected place for you to write and publish, powered by %s." + +msgid "_%s_ is home to %d articles across %d blogs." +msgstr "_%s_ is home to %d articles across %d blogs." + +msgid "" +"## About WriteFreely\n" +"\n" +"%s is a self-hosted, decentralized blogging platform for publishing beautiful, simple blogs.\n" +"\n" +"It lets you publish a single blog, or host a community of writers who can create multiple blogs under one account. You can also enable federation, which allows people in the fediverse to follow your blog, bookmark your posts, and share them with others." +msgstr "" +"## About WriteFreely\n" +"\n" +"%s is a self-hosted, decentralized blogging platform for publishing beautiful, simple blogs.\n" +"\n" +"It lets you publish a single blog, or host a community of writers who can create multiple blogs under one account. You can also enable federation, which allows people in the fediverse to follow your blog, bookmark your posts, and share them with others." + +msgid "Start an instance" +msgstr "Start an instance" + +msgid "Privacy Policy" +msgstr "Privacy Policy" + +# privacy.tmpl 6 +msgid "Last updated" +msgstr "Last updated" + +msgid "Read the latest posts form %s." +msgstr "Read the latest posts form %s." + +# : pages.go:98 +msgid "" +"%s, the software that powers this site, is built to enforce your right to privacy by default.\n" +"\n" +"It retains as little data about you as possible, not even requiring an email address to sign up. However, if you _do_ give us your email address, it is stored encrypted in our database.\n" +"\n" +"We salt and hash your account's password.We store log files, or data about what happens on our servers. We also use cookies to keep you logged in to your account.\n" +"\n" +"Beyond this, it's important that you trust whoever runs %s. Software can only do so much to protect you -- your level of privacy protections will ultimately fall on the humans that run this particular service." +msgstr "" +"%s, the software that powers this site, is built to enforce your right to privacy by default.\n" +"\n" +"It retains as little data about you as possible, not even requiring an email address to sign up. However, if you _do_ give us your email address, it is stored encrypted in our database.\n" +"\n" +"We salt and hash your account's password.We store log files, or data about what happens on our servers. We also use cookies to keep you logged in to your account.\n" +"\n" +"Beyond this, it's important that you trust whoever runs %s. Software can only do so much to protect you -- your level of privacy protections will ultimately fall on the humans that run this particular service." + +# static/js/postactions.js +msgid "Unpublished post" +msgstr "Unpublished post" + +msgid "Moved to %s" +msgstr "Moved to %s" + +msgid "move to" +msgstr "move to" + +msgid "moving to %s..." +msgstr "moving to %s..." + +msgid "unable to move" +msgstr "unable to move" + +msgid "View on %s" +msgstr "View on %s" + +# classic.tmpl 64 +# pad.tmpl 59 +# bare.tmpl 30 +msgid "NOTE" +msgstr "NOTE" + +# classic.tmpl 64 +# pad.tmpl 59 +# bare.tmpl 30 +msgid "for now, you'll need Javascript enabled to post." +msgstr "for now, you'll need Javascript enabled to post." + +# classic.tmpl 158 +# pad.tmpl 174 +msgid "Your account is silenced, so you can't publish or update posts." +msgstr "Your account is silenced, so you can't publish or update posts." + +# classic.tmpl 257 +# pad.tmpl 278 +msgid "Failed to post. Please try again." +msgstr "Failed to post. Please try again." + +# classic.tmpl 163 +# pad.tmpl 179 +# bare.tmpl 99 +msgid "You don't have permission to update this post." +msgstr "You don't have permission to update this post." + +# pad.tmpl 16 +msgid "Write..." +msgstr "Write..." + +# classic.tmpl 34 +# pad.tmpl 29 +msgid "Publish to..." +msgstr "Publish to..." + +# classic.tmpl 55 +# pad.tmpl 50 +msgid "Font" +msgstr "Font" + +# read.tmpl 105 +msgid "from" +msgstr "from" + +# read.tmpl 105 +msgid "Anonymous" +msgstr "Anonymous" + +# read.tmpl 120 +msgid "Older" +msgstr "Older" + +# read.tmpl 121 +msgid "Newer" +msgstr "Newer" + +# password-collection.tmpl 31 +msgid "Menu" +msgstr "Menu" + +# password-collection.tmpl 51 +msgid "This blog requires a password." +msgstr "This blog requires a password." + +# 404-general.tmpl 1 +msgid "Page not found" +msgstr "Page not found" + +# 404-general.tmpl 4 +msgid "This page is missing." +msgstr "This page is missing." + +# 404-general.tmpl 5 +msgid "Are you sure it was ever here?" +msgstr "Are you sure it was ever here?" + +#404.tmpl 1,4 +msgid "Post not found" +msgstr "Post not found" + +#404.tmpl +msgid "Why not share a thought of your own?" +msgstr "Why not share a thought of your own?" + +# 404.tmpl +msgid "Start a blog" +msgstr "Start a blog" + +#404.tmpl +msgid "%s and spread your ideas on **%s**, %s." +msgstr "%s and spread your ideas on **%s**, %s." + +# 404.tmpl +msgid "a simple blogging community" +msgstr "a simple blogging community" + +# 404.tmpl +msgid "a simple, federated blogging community" +msgstr "a simple, federated blogging community" + +# 410.tmpl 1 +msgid "Unpublished" +msgst "Unpublished" + +# 410.tmpl 4 +msgid "Post was unpublished by the author." +msgstr "Post was unpublished by the author." + +# 410.tmpl 5 +msgid "It might be back some day." +msgstr "It might be back some day." diff --git a/locales/eu_ES/LC_MESSAGES/base.mo b/locales/eu_ES/LC_MESSAGES/base.mo new file mode 100644 index 0000000..fa4c70d Binary files /dev/null and b/locales/eu_ES/LC_MESSAGES/base.mo differ diff --git a/locales/eu_ES/LC_MESSAGES/base.po b/locales/eu_ES/LC_MESSAGES/base.po new file mode 100644 index 0000000..6b6810c --- /dev/null +++ b/locales/eu_ES/LC_MESSAGES/base.po @@ -0,0 +1,1740 @@ +msgid "" +msgstr "" +"Project-Id-Version: GOtext\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: Aitzol Berasategi \n" +"Language-Team: Euskara-Basque\n" +"Language: eu\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.3\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +# base.tmpl 40 +# header.tmpl 49 +# pages.tmpl 21 +msgid "Home" +msgstr "Hasiera" + +# base.tmpl 42 +# header.tmpl 51 +# footer.tmpl 8,26 +# user/include/footer.tmpl 11 +msgid "About" +msgstr "Honi buruz" + +# base.tmpl 49 +# header.tmpl 58,65 +# footer.tmpl 9,27 +# user/include/footer.tmpl 12 +# app-settings.tmpl 108 +# pages.tmpl 24 +msgid "Reader" +msgstr "Irakurlea" + +# login.tmpl 21 +# password-collection.tmpl 33 +# base.tmpl 51 +# header.tmpl 60 +msgid "Log in" +msgstr "Saioa hasi" + +# classic.tmpl 48 +# collection.tmpl 63,74 +# pad.tmpl 43 +# base.tmpl 33,51 +# header.tmpl 14,41,60 +msgid "Log out" +msgstr "Saioa itxi" + +# base.tmpl 45 +# export.tmpl 19 +# collections.tmpl 13 +# user/collection.tmpl 105 +# admin.tmpl 59 +# nav.tmpl 2 +# header.tmpl 54,63 +# view-user 106 +msgid "Blog" +msgid_plural "Blogs" +msgstr[0] "Blog" +msgstr[1] "Blogak" + +# bare.tmpl 33 +# export.tmpl 19 +# admin.tmpl 60 +# view-user 132 +msgid "Post" +msgid_plural "Posts" +msgstr[0] "Post" +msgstr[1] "Postak" + +# bare.tmpl 26 +# header.tmpl 55 +msgid "My Posts" +msgstr "Nire postak" + +# classic.tmpl 38 +# edit-meta.tmpl 43 +# pad.tmpl 26,27,33 +# post.tmpl 47 +# base.tmpl 47 +# bare.tmpl 26 +# stats.tmpl 55 +# import.tmpl 41 +# articles.tmpl 25 +# header.tmpl 21,56,64 +# posts.tmpl 23,30,50,57 +msgid "Draft" +msgid_plural "Drafts" +msgstr[0] "Zirriborro" +msgstr[1] "Zirriborroak" + +# login.tmpl 27 +# base.tmpl 50 +# header.tmpl 59 +msgid "Sign up" +msgstr "Erregistratu" + +# classic.tmpl 5 +# collection.tmpl 53 +# pad.tmpl 5 +# base.tmpl 55 +# nav.tmpl 9 +# header.tmpl 25,71 +msgid "New Post" +msgstr "Post berria" + +# header.tmpl 29 +msgid "Return to editor" +msgstr "Itzuli editorera" + +# footer.tmpl 10,14,34 +# user/include/footer.tmpl 13 +msgid "writer's guide" +msgstr "idazlearen gida" + +# footer.tmpl 15,35 +msgid "developers" +msgstr "garatzaileak" + +# footer.tmpl 11,28 +# user/include/footer.tmpl 14 +msgid "privacy" +msgstr "pribatutasuna" + +# footer.tmpl 16,36 +msgid "source code" +msgstr "iturburu kodea" + +# header.tmpl 9,35 +msgid "Admin dashboard" +msgstr "Administrazio-panela" + +# header.tmpl 10,36 +msgid "Account settings" +msgstr "Kontuaren ezarpenak" + +# import.tmpl 17 +# header.tmpl 11,37 +msgid "Import posts" +msgstr "Postak inportatu" + +# base.tmpl 30 +# export.tmpl 5,10 +# header.tmpl 12,38 +msgid "Export" +msgstr "Exportatu" + +# header.tmpl 103 +msgid "Dashboard" +msgstr "Aginte-panela" + +# header.tmpl 104 +msgid "Settings" +msgstr "Ezarpenak" + +# export.tmpl 19 +# admin.tmpl 58 +# header.tmpl 106 +# view-user.tmpl 59 +# users.tmpl 15,21,30 +msgid "User" +msgid_plural "Users" +msgstr[0] "Erabiltzaile" +msgstr[1] "Erabiltzaileak" + +# header.tmpl 107 +# pages.tmpl 13, 17 +msgid "Page" +msgid_plural "Pages" +msgstr[0] "Orria" +msgstr[1] "Orriak" + +# post.tmpl 41 +# posts.tmpl 11,43,64,66 +# view-user 128 +msgid "View" +msgid_plural "Views" +msgstr[0] "Ikustaldi" +msgstr[1] "Ikustaldiak" + +# posts.tmpl 11,43,64,66 +# view-user 128 +# edit-meta.tmpl 49,55 +# pad.tmpl 63 +msgid "View post" +msgid_plural "View posts" +msgstr[0] "Posta ikusi" +msgstr[1] "Postak ikusi" + +# classic.tmpl 41,45 +# collection.tmpl 57 +# header.tmpl 7 +# edit-meta.tmpl 41 +# pad.tmpl 24,36,40 +# nav.tmpl 12 +msgid "View Blog" +msgid_plural "View Blogs" +msgstr[0] "Bloga Ikusi" +msgstr[1] "Blogak Ikusi" + +# classic.tmpl 62 +# pad.tmpl 124 +msgid "word" +msgid_plural "words" +msgstr[0] "hitz" +msgstr[1] "hitzak" + +# pad.tmpl 64 +msgid "Publish" +msgstr "Argitaratu" + +# pad.tmpl 20 +# bare.tmpl 20 +msgid "This post has been updated elsewhere since you last published!" +msgstr "Post hau beste nonbait eguneratua izan da argitaratuz geroztik!" + +# pad.tmpl 20 +# bare.tmpl 20 +msgid "Delete draft and reload" +msgstr "Zirriborroa ezabatu eta birkargatu" + +msgid "Updates" +msgstr "Eguneraketak" + +# classic.tmpl 42 +# pad.tmpl 37 +# user/collection.tmpl 32 +# collection.tmpl 54 +# nav.tmpl 10 +# header.tmpl 19 +msgid "Customize" +msgstr "Pertsonalizatu" + +# classic.tmpl 43 +# collection.tmpl 55 +# pad.tmpl 38 +# stats.tmpl 26 +# nav.tmpl 11 +# header.tmpl 20 +msgid "Stats" +msgstr "Estatistikak" + +# classic.tmpl 47 +# collection.tmpl 58 +# pad.tmpl 42 +msgid "View Draft" +msgid_plural "View Drafts" +msgstr[0] "Zirriborroa Ikusi" +msgstr[1] "Zirriborroak Ikusi" + +# header.tmpl 111 +#, fuzzy +msgid "Monitor" +msgstr "Monitor" + +# read.tmpl 108,110 +msgid "Read more..." +msgstr "Irakurri gehiago..." + +# silenced.tmpl 3 +msgid "Your account has been silenced." +msgstr "Zure kontua isilarazia izan da." + +# silenced.tmpl 3 +msgid "" +"You can still access all of your posts and blogs, but no one else can " +"currently see them." +msgstr "Oraindik zure blog eta postak ikus ditzakezu, baina ez beste inork." + +# articles.tmpl 28 +msgid "" +"These are your draft posts. You can share them individually (without a blog) " +"or move them to your blog when you're ready." +msgstr "" +"Hauek zure zirriborroak dira. Bakarka partekatu ahal izango dituzu (blogik " +"gabe), edo prest dituzunean blogera mugitu eta argitaratu." + +# articles.tmpl 57 +msgid "" +"Your anonymous and draft posts will show up here once you've published some. " +"You'll be able to share them individually (without a blog) or move them to a " +"blog when you're ready." +msgstr "" +"Zure zirriborro eta sarrera anonimoak hemen agertuko dira. Bakarka partekatu " +"ahal izango dituzu (blogik gabe), edo prest dituzunean blogera mugitu eta " +"argitaratu." + +# articles.tmpl 58 +msgid "Alternatively, see your blogs and their posts on your %s page." +msgstr "Bestela, blogak eta argitalpenak ikusi ditzakezu %s orrian." + +# articles.tmpl 60 +msgid "Start writing" +msgstr "Idazten hasi" + +# articles.tmpl 64 +# static/js/postactions.js +#, fuzzy +msgid "unsynced posts" +msgstr "argitaratu gabeko posta" + +# articles.tmpl 64 +# collection.tmpl 43 +# view-page.tmpl 51 +# view-user 116 +msgid "Title" +msgstr "Izenburua" + +# collection.tmpl 44 +# view-user 120 +msgid "Description" +msgstr "Deskribapena" + +# collection.tmpl 50 +msgid "This blog uses your username in its URL." +msgstr "Blog honek zure erabiltzaile izena darabil bere URL-an." + +# collection.tmpl 50 +msgid "This blog uses your username in its URL and fediverse handle." +msgstr "" +"Blog honek zure erabiltzaile izena darabil bere URL-an eta fedibertsoaren " +"kudeaketan." + +# collection.tmpl 50 +msgid "You can change it in your %s." +msgstr "Hori %s atalean alda dezakezu." + +# collection.tmpl 63 +msgid "Publicity" +msgstr "Publikotasuna" + +# collection.tmpl 68 +# app-settings.tmpl 120 +#, fuzzy +msgid "Unlisted" +msgstr "Irekia" + +# user/collection.tmpl 87 +# app-settings.tmpl 121 +msgid "Public" +msgstr "Publikoa" + +# user/collection.tmpl 74 +# app-settings.tmpl 122 +msgid "Private" +msgstr "Pribatua" + +# user/collection.tmpl 70 +msgid "This blog is visible to any registered user on this instance." +msgstr "" +"Blog hau instantzia honetan erregistraturiko edonorentzat dago ikusgai." + +# user/collection.tmpl 70 +msgid "This blog is visible to anyone with its link." +msgstr "Blog hau bere esteka duen edonorentzat dago ikusgai." + +# user/collection.tmpl 76 +msgid "Only you may read this blog (while you're logged in)." +msgstr "Zuk bakarrik irakur dezakezu blog hau (saioa hasita duzun bitartean)." + +# user/collection.tmpl 80 +msgid "Password-protected:" +msgstr "Pasahitzez-babestua:" + +# user/collection.tmpl 80 +msgid "a memorable password" +msgstr "pasahitz gogoangarri bat" + +# user/collection.tmpl 82 +msgid "A password is required to read this blog." +msgstr "Pasahitza behar da blog hau irakurtzeko." + +# user/collection.tmpl 89 +msgid "" +"This blog is displayed on the public %s, and is visible to anyone with its " +"link." +msgstr "" +"Blog hau %s atal publikoan bistaratzen da, eta esteka ezagutzen duen " +"edonorentzat dago ikusgai." + +# user/collection.tmpl 89 +msgid "" +"This blog is displayed on the public %s, and is visible to any registered " +"user on this instance." +msgstr "" +"Blog hau %s atal publikoan bistaratzen da, eta instantzia honetan " +"erregistraturiko edonorentzat dago ikusgai." + +# user/collection.tmpl 90 +msgid "The public reader is currently turned off for this community." +msgstr "" +"Irakurlea atal publikoa desgaituta dago une honetan komunitate honentzat." + +# user/collection.tmpl 98 +msgid "Display Format" +msgstr "Bistaratzea" + +# user/collection.tmpl 100 +msgid "Customize how your posts display on your page." +msgstr "Pertsonalizatu zure postak zure orrian bistaratzeko modua." + +# user/collection.tmpl 107 +msgid "Dates are shown. Latest posts listed first." +msgstr "Datak erakusten dira. Post berrienak zerrendan lehenak." + +# user/collection.tmpl 113 +msgid "No dates shown. Oldest posts first." +msgstr "Datarik ez da erakusten. Post zaharrenak zerrendan lehenak." + +# user/collection.tmpl 119 +msgid "No dates shown. Latest posts first." +msgstr "Datarik ez da erakusten. Post berrienak lehenak." + +# user/collection.tmpl 126 +msgid "Text Rendering" +msgstr "Testu Errendatzea" + +# user/collection.tmpl 128 +msgid "Customize how plain text renders on your blog." +msgstr "Pertsonalizatu testu-laua zure blogean errendatzeko modua." + +# user/collection.tmpl 145 +msgid "Custom CSS" +msgstr "CSS pertsonalizazioa" + +# user/collection.tmpl 148 +msgid "customization" +msgstr "pertsonalizazio" + +# user/collection.tmpl 148 +msgid "See our guide on %s." +msgstr "Ikusi gure %s gida." + +# user/collection.tmpl 153 +msgid "Post Signature" +msgstr "Post Sinadura" + +# user/collection.tmpl 155 +msgid "" +"This content will be added to the end of every post on this blog, as if it " +"were part of the post itself. Markdown, HTML, and shortcodes are allowed." +msgstr "" +"Eduki hau blog honetako post bakoitzaren amaieran gehituko da, postarena " +"balitz bezala. Markdown, HTML, eta azpikodeak onartzen dira." + +# user/collection.tmpl 162 +msgid "Web Monetization" +msgstr "Web Monetizazioa" + +# user/collection.tmpl 164 +msgid "" +"Web Monetization enables you to receive micropayments from readers that have " +"a %s. Add your payment pointer to enable Web Monetization on your blog." +msgstr "" +"Web Monetizazioak mikro-ordainketak jasotzeko aukera eskaintzen dizu %s " +"duten irakurleengandik. Gehitu zure ordainketa datuak Web Monetizazioa zure " +"blogean gaitzeko." + +# user/collection.tmpl 164 +msgid "Coil membership" +msgstr "Coil kontua" + +# edit-meta.tmpl 263 +# settings.tmpl 81 +# user/collection.tmpl 171 +msgid "Save changes" +msgstr "Gorde aldaketak" + +# user/collection.tmpl 173 +msgid "Delete Blog..." +msgstr "Bloga ezabatu..." + +# user/collection.tmpl 190,220 +# articles.tmpl 36 +# posts.tmpl 19,46 +msgid "Delete" +msgstr "Ezabatu" + +# settings.tmpl 187 +# user/collection.tmpl 189 +# view-user 173 +msgid "Cancel" +msgstr "Utzi" + +# user/collection.tmpl 180 +msgid "Are you sure you want to delete this blog?" +msgstr "Ziur al zaude blog hau ezabatu nahi duzula?" + +# posts.js 46,147 +# collection.tmpl 148 +# collection-tags.tmpl 96 +# chorus-collection.tmpl 132 +msgid "Are you sure you want to delete this post?" +msgstr "Ziur al zaude post hau ezabatu nahi duzula?" + +# posts.js 302 +# collection.tmpl 175,226 +# collection-tags.tmpl 123,174 +# chorus-collection.tmpl 159,210 +msgid "" +"Post is synced to another account. Delete the post from that account instead." +msgstr "" +"Posta beste kontu batekin sinkronizatzen da. Ezaba ezazu kontu horretako " +"posta." + +# posts.js 308 +# collection.tmpl 181 +# collection-tags.tmpl 129 +# chorus-collection.tmpl 165 +msgid "Failed to delete." +msgstr "Ezabatzeak huts egin du." + +# posts.js 308 +# collection.tmpl 181 +# collection-tags.tmpl 129 +# chorus-collection.tmpl 165 +msgid "Please try again." +msgstr "Saia zaitez berriro." + +# user/collection.tmpl 182 +msgid "" +"This will permanently erase **%s** (%s/%s) from the internet. Any posts on " +"this blog will be saved and made into drafts (found on your %s page)." +msgstr "" +"Honek **%s** (%s/%s) betirako ezabatuko du internetetik. Blog honetako post " +"guztiak %s orrira igaroko dira." + +# user/collection.tmpl 183 +msgid "" +"If you're sure you want to delete this blog, enter its name in the box below " +"and press **%s**." +msgstr "" +"Blog hau ezabatu nahi duzula ziur bazaude, sartu bere izena beheko eremuan " +"eta sakatu **%s**." + +# user/collection.tmpl 202 +msgid "Enter **%s** in the box below." +msgstr "Sartu **%s** beheko eremuan." + +# collection.tmpl 238 +msgid "Saving changes..." +msgstr "Aldaketak gordetzen..." + +# collections.tmpl 72,75,84 +msgid "This name is taken." +msgstr "Izen hori erabilita dago." + +# pad.tmpl 61 +msgid "Edit post metadata" +msgstr "Metadatuak editatu" + +# edit-meta.tmpl 5,55 +msgid "Edit metadata" +msgstr "Metadatuak editatu" + +# edit-meta.tmpl 260 +msgid "now" +msgstr "orain" + +# edit-meta.tmpl 63 +msgid "Slug" +msgstr "Sluga" + +# edit-meta.tmpl 66 +msgid "Language" +msgstr "Hizkuntza" + +# edit-meta.tmpl 256 +msgid "Direction" +msgstr "Norabidea" + +# edit-meta.tmpl 258 +msgid "Created" +msgstr "Sortze data" + +# edit-meta.tmpl 257 +msgid "right-to-left" +msgstr "eskuinetik-ezkerrera" + +# edit-meta.tmpl 47 +msgid "Edit post" +msgstr "Posta editatu" + +# edit-meta.tmpl 48 +# pad.tmpl 6 +msgid "Toggle theme" +msgstr "Gaia aldatu" + +# collection-post.tmpl 66 +# posts.tmpl 8 +msgid "Scheduled" +msgstr "Programatua" + +# collection-post.tmpl 57 +# post.tmpl 45,91 +# articles.tmpl 35 +# posts.tmpl 17,44 +msgid "Edit" +msgstr "Editatu" + +# posts.tmpl 18,45 +msgid "Pin" +msgstr "Finkatu" + +# collection-post.tmpl 58 +msgid "Unpin" +msgstr "Askatu" + +# posts.tmpl 21,48 +msgid "Move this post to another blog" +msgstr "Mugitu post hau beste blog batetara" + +# posts.tmpl 30,57 +msgid "Change to a draft" +msgstr "Eraman zirriborroetara" + +# posts.tmpl 30,57 +msgid "change to _%s_" +msgstr "bihurtu _%s_" + +# articles.tmpl 43,78 +# posts.tmpl 26,53 +msgid "move to..." +msgstr "mugi hona..." + +# articles.tmpl 47,83 +msgid "move to %s" +msgstr "eraman %s-ra" + +# post.tmpl 42 +msgid "View raw" +msgstr "Raw-eran ikusi" + +# articles.tmpl 47,83 +msgid "Publish this post to your blog %s" +msgstr "Argitaratu post hau zure %s blogean" + +# articles.tmpl 39,74 +msgid "Move this post to one of your blogs" +msgstr "Mugitu post hau zure blogetako batetara" + +# articles.tmpl 55 +msgid "Load more..." +msgstr "Kargatu gehiago..." + +# stats.tmpl 32 +msgid "Stats for all time." +msgstr "Estatistika orokorrak." + +# stats.tmpl 35 +msgid "Fediverse stats" +msgstr "Fedibertsoko estatistikak" + +# stats.tmpl 38 +msgid "Followers" +msgstr "Jarraitzaileak" + +# stats.tmpl 46 +msgid "Top %d post" +msgid_plural "Top %d posts" +msgstr[0] "%d. posta" +msgstr[1] "Lehen %d postak" + +# stats.tmpl 51 +msgid "Total Views" +msgstr "Bistaratzeak" + +# settings.tmpl 27 +msgid "Before you go..." +msgstr "Joan aurretik..." + +# settings.tmpl 27 +msgid "Account Settings" +msgstr "Kontuaren Ezarpenak" + +# settings.tmpl 38 +msgid "Change your account settings here." +msgstr "Aldatu hemen zure kontuaren ezarpenak." + +# signup.tmpl 80 +# signup-oauth.tmpl 85,87 +# login.tmpl 21 +# landing.tmpl 92 +# settings.tmpl 43 +# view-user.tmpl 62 +msgid "Username" +msgstr "Erabiltzaile-izena" + +# settings.tmpl 46 +msgid "Update" +msgstr "Eguneratu" + +# settings.tmpl 56 +msgid "Passphrase" +msgstr "Pasaesaldia" + +# settings.tmpl 58 +msgid "Add a passphrase to easily log in to your account." +msgstr "Gehitu pasaesaldia saioa erraztasunez hasteko." + +# settings.tmpl 59,60 +msgid "Current passphrase" +msgstr "Uneko pasaesaldia" + +# settings.tmpl 61,64 +msgid "New passphrase" +msgstr "Pasaesaldi berria" + +# settings.tmpl 60,64 +msgid "Show" +msgstr "Erakutsi" + +msgid "Account updated." +msgstr "Kontua eguneratu da." + +# signup.tmpl 91 +# signup-oauth.tmpl 92,94 +# landing.tmpl 103 +# settings.tmpl 69 +msgid "Email" +msgstr "Emaila" + +# settings.tmpl 76 +msgid "Email address" +msgstr "Email helbidea" + +# settings.tmpl 71 +msgid "Add your email to get:" +msgstr "Gehitu zure emaila hauek eskuratzeko:" + +# settings.tmpl 34 +msgid "Please add an **%s** and/or **%s** so you can log in again later." +msgstr "Mesedez gehitu saioa hasteko erabiliko dituzun **%s** edo/eta **%s**." + +# settings.tmpl 73 +msgid "No-passphrase login" +msgstr "Pasaesaldi gabeko saio hasiera" + +# settings.tmpl 74 +msgid "Account recovery if you forget your passphrase" +msgstr "Kontu berreskuratzea pasaesaldia ahaztuz gero" + +# settings.tmpl 89 +msgid "Linked Accounts" +msgstr "Lotutako Kontuak" + +# settings.tmpl 90 +msgid "These are your linked external accounts." +msgstr "Hauek dira lotutako zure kanpo-kontuak." + +# settings.tmpl 114 +msgid "Link External Accounts" +msgstr "Kanpoko Kontuak Lotu" + +msgid "" +"Connect additional accounts to enable logging in with those providers, " +"instead of using your username and password." +msgstr "" +"Konektatu kontu gehigarriak hornitzaile horiekin saioa hasteko, zure " +"erabiltzaile-izena eta pasahitza erabili beharrean." + +# settings.tmpl 162 +# view-user 149 +msgid "Incinerator" +msgstr "Errauskailua" + +# settings.tmpl 166,169,188 +msgid "Delete your account" +msgstr "Ezabatu zure kontua" + +# settings.tmpl 167 +msgid "Permanently erase all your data, with no way to recover it." +msgstr "Ezabatu zure datu guztiak, berreskuratzeko modurik gabe." + +# settings.tmpl 176 +# view-user 163 +msgid "Are you sure?" +msgstr "Ziur al zaude?" + +# settings.tmpl 178 +msgid "export your data" +msgstr "zure datuak esportatu" + +# settings.tmpl 178 +msgid "" +"This action **cannot** be undone. It will immediately and permanently erase " +"your account, including your blogs and posts. Before continuing, you might " +"want to %s." +msgstr "" +"Ekintza hau **ezin da** desegin. Honek berehala eta betirako ezabatuko du " +"zure kontua, blogak eta argitalpenak barne. Jarraitu aurretik agian %s nahi " +"zenituzke." + +# settings.tmpl 179 +msgid "If you're sure, please type **%s** to confirm." +msgstr "Ziur baldin bazaude, idatzi **%s** berresteko." + +# invite-help.tmpl 13 +msgid "Invite to %s" +msgstr "%s gonbidatu" + +# invite-help.tmpl 15 +msgid "This invite link is expired." +msgstr "Esteka hau iraungita dago." + +# invite-help.tmpl 21 +msgid "Only **one** user" +msgstr "Erabiltzaile **bakarrak**" + +# invite-help.tmpl 21 +msgid "Up to **%d** users" +msgstr "**%d** erabiltzaileko kopuruak" + +# invite-help.tmpl 21 +msgid "can sign up with this link." +msgstr "hasi dezake saioa esteka honekin." + +# invite-help.tmpl 23 +msgid "It expires on **%s**." +msgstr "Iraungitze data: **%s**." + +# invite-help.tmpl 25 +msgid "It can be used as many times as you like" +msgstr "Nahi duzun adina aldiz erabili daiteke" + +# invite-help 25 +msgid "before **%s**, when it expires" +msgstr "**%s** baino lehen, iraungitzen denean alegia" + +msgid "person has" +msgid_plural "person have" +msgstr[0] "pertsonak" +msgstr[1] "pertsonek" + +# invite-help.tmpl 21 +msgid "So far, **%d** %s used it." +msgstr "Orain arte, **%d** %s erabili dute." + +# invite-help.tmpl 21 +# So far, {{.Invite.Uses}} {{pluralize "person has" "people have" .Invite.Uses}} used it. +# invite-help.tmpl 21 +# invite-help.tmpl 17 +msgid "" +"Copy the link below and send it to anyone that you want to join *%s*. You " +"could paste it into an email, instant message, text message, or write it " +"down on paper. Anyone who navigates to this special page will be able to " +"create an account." +msgstr "" +"Kopiatu ondorengo esteka eta *%s* gunera batzea nahi duzun lagunari bidali. " +"Email batean erantsiz bidal dezakezu, mezularitza zerbitzu baten bidez, " +"testu-mezu moduan edo paper zati batean idatziz. Helbide berezi honetara " +"nabigatzen duen edonork izango du kontu bat sortzeko aukera." + +# IMPORT PAGE +# import.tmpl 28 +msgid "" +"Publish plain text or Markdown files to your account by uploading them below." +msgstr "Argitaratu testu-lau edo Markdown fitxategiak zure kontura igoaz." + +# import.tmpl 31 +msgid "Select some files to import:" +msgstr "Hautatu fitxategiak inportatzeko:" + +# import.tmpl 36 +msgid "Import these posts to:" +msgstr "Inportatu postak hona:" + +# import.tmpl 59 +msgid "Import" +msgstr "Inportatu" + +msgid "Import complete, %d post imported." +msgid_plural "Import complete, %d posts imported." +msgstr[0] "Import complete, %d post imported." +msgstr[1] "Import complete, %d posts imported." + +msgid "%d of %d posts imported, see details below." +msgid_plural "%d of %d posts imported, see details below." +msgstr[0] "%d of %d posts imported, see details below." +msgstr[1] "%d of %d posts imported, see details below." + +msgid "%s is not a supported post file" +msgstr "%s post fitxategia ez da onartzen" + +# export.tmpl 6 +msgid "" +"Your data on %s is always free. Download and back-up your work any time." +msgstr "" +"Zure datuen biltegiratzea doanekoa da %s webgunean. Deskargatu eta egin zure " +"lanen babeskopia edonoiz." + +# export.tmpl 11 +msgid "Format" +msgstr "Formatua" + +# header.tmpl 101 +msgid "Admin" +msgstr "Admin" + +# app-settings.tmpl 37 +msgid "Site Title" +msgstr "Gunearen Izenburua" + +# app-settings.tmpl 38 +msgid "Your public site name." +msgstr "Gune publikoaren izena." + +# app-settings.tmpl 44 +msgid "Site Description" +msgstr "Gunearen Deskribapena" + +# app-settings.tmpl 45 +msgid "Describe your site — this shows in your site's metadata." +msgstr "Deskribatu zure gunea — hau gunearen metadatuetan erakutsiko da." + +# app-settings.tmpl 51 +msgid "Host" +msgstr "Host" + +# app-settings.tmpl 52 +msgid "" +"The public address where users will access your site, starting with `http://" +"` or `https://`." +msgstr "" +"Erabiltzaileek gunean sartzeko erabiliko duten helbidea, hasieran `http://` " +"edo `https://` protokoloa zehaztuz." + +# app-settings.tmpl 58 +msgid "Community Mode" +msgstr "Komunitate Modua" + +# app-settings.tmpl 59 +msgid "Whether your site is made for one person or many." +msgstr "Zure gunea pertsona bakarrarentzat edo askorentzat egina dagoen." + +# app-settings.tmpl 61 +msgid "Single user" +msgstr "Erabiltzaile bakarra" + +# app-settings.tmpl 61 +msgid "Multiple users" +msgstr "Erabiltzaile anitz" + +# app-settings.tmpl 65 +msgid "Landing Page" +msgstr "Helburu-orria" + +# app-settings.tmpl 66 +msgid "" +"The page that logged-out visitors will see first. This should be an absolute " +"path like: `/read`." +msgstr "" +"Saioa hasi gabe duten erabiltzaileek hasieran ikusiko duten orria. Honen " +"moduko bide absolutua izan beharko litzateke: `/read`." + +# app-settings.tmpl 72 +msgid "Open Registrations" +msgstr "Erregistro Irekia" + +# app-settings.tmpl 73 +msgid "Allow anyone who visits the site to create an account." +msgstr "Gunea bisitatzen duen edonori kontua sortzen utzi." + +# app-settings.tmpl 80 +msgid "Allow account deletion" +msgstr "Kontua ezabatzen utzi" + +# app-settings.tmpl 81 +msgid "" +"Allow all users to delete their account. Admins can always delete users." +msgstr "" +"Erabiltzaileei beraien kontua ezabatzen utzi. Administratzaileek beti " +"ezabatu ditzakete erabiltzaileak." + +# app-settings.tmpl 88 +msgid "Allow invitations from..." +msgstr "Gonbidapen onarpena" + +# app-settings.tmpl 89 +msgid "Choose who is allowed to invite new people." +msgstr "Zehaztu nor dagoen baimenduta jende berria gonbidatzera." + +# app-settings.tmpl 93 +msgid "No one" +msgstr "Inor ez" + +# app-settings.tmpl 94 +msgid "Only Admins" +msgstr "Admin-ak soilik" + +# app-settings.tmpl 95 +msgid "All Users" +msgstr "Erabiltzaile oro" + +# app-settings.tmpl 101 +msgid "Private Instance" +msgstr "Instantzia Pribatua" + +# app-settings.tmpl 102 +msgid "Limit site access to people with an account." +msgstr "Sarbidea mugatu kontua duten erabiltzaileei." + +# app-settings.tmpl 109 +msgid "Show a feed of user posts for anyone who chooses to share there." +msgstr "" +"Erabiltzailearen argitalpenen feed bat erakutsi bertan elkarbanatzea " +"aukeratzen duen edonorentzat." + +# app-settings.tmpl 115 +msgid "Default blog visibility" +msgstr "Blogaren ikusgarritasuna" + +# app-settings.tmpl 116 +msgid "The default setting for new accounts and blogs." +msgstr "Kontu eta blog berrientzako lehenetsitako ezarpena." + +# app-settings.tmpl 128 +msgid "Maximum Blogs per User" +msgstr "Blog Kopurua Erabiltzaileko" + +# app-settings.tmpl 129 +msgid "" +"Keep things simple by setting this to **1**, unlimited by setting to **0**, " +"or pick another amount." +msgstr "" +"Guztia modu sinplean mantentzeko sartu **1**, mugagabea **0** ezarriz, " +"bestela gogoko kopurua zehaztu dezakezu." + +# app-settings.tmpl 135 +msgid "Federation" +msgstr "Federazioa" + +# app-settings.tmpl 136 +msgid "" +"Enable accounts on this site to propagate their posts via the ActivityPub " +"protocol." +msgstr "" +"Gaitu gune honetako kontuek ActivityPub protokolo bidez postak zabaldu " +"ditzaten." + +# app-settings.tmpl 142 +msgid "Public Stats" +msgstr "Estatistika Publikoak" + +# app-settings.tmpl 143 +msgid "Publicly display the number of users and posts on your **%s** page." +msgstr "Erakutsi publikoki erabiltzaile eta post kopurua **%s** orrian." + +# app-settings.tmpl 149 +msgid "Monetization" +msgstr "Monetizazioa" + +# app-settings.tmpl 150 +msgid "Enable blogs on this site to receive micropayments from readers via %s." +msgstr "" +"Gaitu gune honetako blogak irakurleengandik mikro-ordainketak jaso ditzaten, " +"%s-en bidez." + +# app-settings.tmpl 156 +msgid "Minimum Username Length" +msgstr "Erabiltzaile-izenaren gutxieneko luzera" + +# app-settings.tmpl 157 +msgid "" +"The minimum number of characters allowed in a username. (Recommended: 2 or " +"more.)" +msgstr "" +"Erabiltzaile-izenean onarturiko gutxieneko karaktere kopurua. (Gomendatua: 2 " +"edo gehiago.)" + +# app-settings.tmpl 162 +msgid "Save Settings" +msgstr "Gorde Ezarpenak" + +# app-settings.tmpl 166 +msgid "configuration docs" +msgstr "konfiguraketa dokumentuetan" + +# app-settings.tmpl 166 +msgid "Still have questions? Read more details in the %s." +msgstr "Zalantzak dituzu oraindik? Irakurri xehetasun gehiago %s." + +msgid "Configuration saved." +msgstr "Konfiguraketa gorde da." + +# view-user.tmpl 66 +# users.tmpl 22 +msgid "joined" +msgstr "elkartua" + +# users.tmpl 23 +msgid "type" +msgstr "mota" + +# users.tmpl 24 +# view-user.tmpl 79 +msgid "status" +msgstr "egoera" + +# base.tmpl 31 +# header.tmpl 39 +# invite.tmpl 26 +# users.tmpl 16 +msgid "Invite people" +msgstr "Jendea gonbidatu" + +# invite.tmpl 27 +msgid "" +"Invite others to join *%s* by generating and sharing invite links below." +msgstr "" +"Gonbidatu lagunen bat *%s* gunera batu dadin gonbidapen esteka bat sortu eta " +"berarekin elkarbanatuz." + +# invite.tmpl 31 +msgid "Maximum number of uses:" +msgstr "Gehienezko erabilera kopurua:" + +# invite.tmpl 33 +msgid "No limit" +msgstr "Mugagabea" + +# invite.tmpl 34,35,36,37,38,39,64 +msgid "use" +msgid_plural "uses" +msgstr[0] "use" +msgstr[1] "uses" + +# invite.tmpl 43 +msgid "Expire after:" +msgstr "Iraungitze data:" + +# invite.tmpl 46 +msgid "minute" +msgid_plural "minutes" +msgstr[0] "minute" +msgstr[1] "minutes" + +# invite.tmpl 47,48,49 +msgid "hour" +msgid_plural "hours" +msgstr[0] "hour" +msgstr[1] "hours" + +# invite.tmpl 50,51 +msgid "day" +msgid_plural "days" +msgstr[0] "day" +msgstr[1] "days" + +# invite.tmpl 52 +msgid "week" +msgid_plural "weeks" +msgstr[0] "week" +msgstr[1] "weeks" + +# invite.tmpl 57 +msgid "You cannot generate invites while your account is silenced." +msgstr "" +"Ezin duzu gonbidapenik sortu zure kontua isilarazirik dagoen bitartean." + +# invite.tmpl 57 +msgid "Generate" +msgstr "Sortu" + +# invite.tmpl 63 +msgid "Link" +msgstr "Lotura" + +# invite.tmpl 121,129,137,145,152 +msgid "ToLink" +msgstr "Lotu" + +# invite.tmpl 65 +msgid "Expires" +msgstr "Iraungitzea" + +# invite.tmpl 71 +msgid "Expired" +msgstr "Iraungita" + +# invite.tmpl 75 +msgid "No invites generated yet." +msgstr "Oraindik ez da gonbidapenik sortu." + +# pages.tmpl 18 +msgid "last modified" +msgstr "azken aldaketa" + +# view-user.tmpl 85 +msgid "Active" +msgstr "Aktibo" + +# view-user.tmpl 82 +msgid "Silenced" +msgstr "Isilarazia" + +# view-user.tmpl 83 +msgid "Unsilence" +msgstr "Ez-isilarazi" + +# view-user 86 +msgid "disabled" +msgstr "desgaitua" + +# view-user 86 +msgid "Silence" +msgstr "Isilarazi" + +# view-user.tmpl 54 +msgid "No." +msgstr "Zkia." + +# view-user.tmpl 70 +msgid "total posts" +msgstr "postak guztira" + +# view-user.tmpl 74,136 +msgid "last post" +msgstr "azken posta" + +# signup.tmpl 87 +# login.tmpl 22 +# landing.tmpl 99 +# view-user 92 +msgid "password" +msgstr "pasahitza" + +msgid "Change your password" +msgstr "Aldatu zure pasahitza" + +# view-user 100 +msgid "Go to reset password page" +msgstr "Pasahitza berrezartzeko orrira joan" + +# view-user 141 +msgid "Fediverse followers" +msgstr "Fedibertsoko jarraitzaileak" + +# view-user 124 +msgid "Visibility" +msgstr "Ikusgarritasuna" + +# view-user 112 +msgid "Alias" +msgstr "Ezizena" + +# view-user.tmpl 75,137 +msgid "Never" +msgstr "Inoiz ez" + +# view-user 97 +msgid "Reset" +msgstr "Berrezarri" + +# view-user 153,156,174 +msgid "Delete this user" +msgstr "Erabiltzailea ezabatu" + +# view-user 154 +msgid "Permanently erase all user data, with no way to recover it." +msgstr "" +"Betiko ezabatu erabiltzailearen datu guztiak, berreskuratzeko aukerarik gabe." + +# view-user 165 +msgid "" +"This action **cannot**be undone. It will permanently erase all traces of " +"this user, **%s**, including their account information, blogs, and posts." +msgstr "" +"Ekintza hau **ezingo da** desegin. Betiko ezabatuko ditu erabiltzaile honen " +"aztarna guztiak, **%s**, bere kontuaren informazioa barne, blogak, eta " +"postak." + +# view-user 166 +msgid "Please type **%s** to confirm." +msgstr "Mesedez idatzi **%s** baieztatzeko." + +# view-user 202 +msgid "" +"Silence this user? They'll still be able to log in and access their posts, " +"but no one else will be able to see them anymore. You can reverse this " +"decision at any time." +msgstr "" +"Erabiltzailea isilarazi? Isilarazitako erabiltzaileek sarbidea izaten " +"jarraituko dute beraien idatzietara, baina ez ditu inork ikusiko. Erabaki " +"hau edozein unetan alda dezakezu." + +# view-user 208 +msgid "" +"Reset this user's password? This will generate a new temporary password that " +"you'll need to share with them, and invalidate their old one." +msgstr "" +"Erabiltzailearen pasahitza berrezarri? Honek aldi baterako pasahitz berri " +"bat sortuko du, beraiekin partekatu beharko duzuna eta zaharra baliogabetu." + +# settings.tmpl 225 +# collection.tmpl 207 +# view-user.tmpl 198 +msgid "Deleting..." +msgstr "Ezabatzen..." + +# view-user.tmpl 46 +msgid "This user's password has been reset to:" +msgstr "Erabiltzaile honen pasahitza hona berrezarri da:" + +# view-user.tmpl 48 +msgid "" +"They can use this new password to log in to their account. **This will only " +"be shown once**, so be sure to copy it and send it to them now." +msgstr "" +"Pasahitz berri hau kontuan saio hasteko erabili ahal izango da. **Behin " +"bakarrik erakutsiko da**, beraz, ziurtatu kopiatu eta bidaltzeaz." + +# view-user.tmpl 49 +msgid "Their email address is:" +msgstr "Email helbidea:" + +# app-updates.tmlp 19 +msgid "Automated update check failed." +msgstr "Eguneratze automatizatuaren egiaztatzeak huts egin du." + +# app-updates.tmlp 20, 24, 41 +msgid "Installed version: %s (%s)." +msgstr "Instalaturiko bertsioa: %s (%s)." + +# app-updates.tmlp 21, 42 +msgid "Learn about latest releases on the %s or %s." +msgstr "Ezagutu azken bertsioen inguruan %s-ean edo %s-ean." + +# app-updates.tmlp 23 +msgid "WriteFreely is **up to date**." +msgstr "WriteFreely **eguneratuta** dago." + +# app-updates.tmlp 27 +msgid "Get" +msgstr "Lortu" + +# app-updates.tmlp 27 +msgid "A new version of WriteFreely is available! **%s %s**" +msgstr "WriteFreely bertsio berri bat dago eskuragarri! **%s %s**" + +# app-updates.tmlp 28 +msgid "release notes" +msgstr "bertsio oharrak" + +# app-updates.tmlp 29 +msgid "" +"Read the %s for details on features, bug fixes, and notes on upgrading from " +"your current version, **%s**." +msgstr "" +"Irakurri %s, **%s** bertsioaren ezaugarriei, akatsen zuzenketei eta " +"eguneratze-oharrei buruzko xehetasunak ezagutzeko." + +# app-updates.tmlp 31 +msgid "Check now" +msgstr "Egiaztatu orain" + +# app-updates.tmlp 31 +msgid "Last checked" +msgstr "Azkenengoz egiaztatua" + +# app-updates.tmlp 40 +msgid "Automated update checks are disabled." +msgstr "Eguneratze-kontrol automatizatuak desgaituta daude." + +# ADMIN PAGES +# view-page.tmpl 45 +msgid "Banner" +msgstr "Bannerra" + +# view-page.tmpl 56 +msgid "Body" +msgstr "Body" + +# view-page.tmpl 33 +msgid "Outline your %s." +msgstr "Azaldu zure %s." + +# view-page.tmpl 35,37 +msgid "Customize your %s page." +msgstr "Pertsonalizatu zure %s orria." + +# view-page.tmpl 31 +msgid "Describe what your instance is %s." +msgstr "Egin deskribapena instantzia %s." + +msgid "Accepts Markdown and HTML." +msgstr "Markdown eta HTML erabili daitezke." + +# view-page.tmpl 56 +msgid "Content" +msgstr "Edukia" + +# view-page.tmpl 63 +msgid "Save" +msgstr "Gorde" + +# view-page.tmpl 71 +msgid "Saving..." +msgstr "Gordetzen..." + +# view-page.tmpl 48 +msgid "" +"We suggest a header (e.g. `# Welcome`), optionally followed by a small bit " +"of text. Accepts Markdown and HTML." +msgstr "" +"Goiburu bat iradokitzen dugu (adib. ` # Ongi Etorri`), aukeran testu pixka " +"batez jarraituz. Markdown eta HTML onartzen dira." + +# login.tmpl 11 +msgid "Log in to %s" +msgstr "Hasi saioa %s gunean" + +# login.tmpl 32 +msgid "Logging in..." +msgstr "Saioa hasten..." + +# login.tmpl 27 +msgid "_No account yet?_ %s to start a blog." +msgstr "_Konturik ez oraindik?_ %s blog bat hasteko." + +msgid "Incorrect password." +msgstr "Pasahitz okerra." + +msgid "This user never set a password. Perhaps try logging in via OAuth?" +msgstr "" +"Erabiltzaile honek ez du pasahitzik ezarririk. Beharbada OAuth bidez saiatu?" + +msgid "" +"This user never added a password or email address. Please contact us for " +"help." +msgstr "" +"Erabiltzaile honek ez du inoiz pasahitz edo emailik gehitu. Jarri gurekin " +"harremanetan laguntza jasotzeko." + +msgid "You're doing that too much." +msgstr "Gehiegitan ari zara hori egiten." + +msgid "Parameter `alias` required." +msgstr "Sartu erabiltzaile izena." + +msgid "A username is required." +msgstr "Sartu erabiltzaile izena." + +msgid "Parameter `pass` required." +msgstr "Sartu ezazu pasahitza." + +msgid "A password is required." +msgstr "Pasahitza beharrezkoa da." + +msgid "Need a collection `alias` to read." +msgstr "Bilduma `ezizen` bat behar da irakurtzeko." + +msgid "Please supply a password." +msgstr "Mesedez sartu pasahitz bat." + +msgid "Something went very wrong. The humans have been alerted." +msgstr "Zeozer oso gaizki atera da. Gizakiak jakinaren gain jarriko dira." + +msgid "Logging out failed. Try clearing cookies for this site, instead." +msgstr "Irtetzeak huts egin du. Horren ordez, saia zaitez cookieak garbitzen." + +msgid "your-username" +msgstr "zure-erabiltzaile-izena" + +msgid "optional" +msgstr "hautazkoa" + +msgid "Create blog" +msgstr "Sortu bloga" + +# signup-oauth.tmpl 59 +msgid "Finish creating account" +msgstr "Amaitu kontua sortzen" + +# signup-oauth.tmpl 79 +msgid "Display Name" +msgstr "Bistaratze izena" + +# oauth.tmpl 26 +msgid "or" +msgstr "edo" + +# oauth.tmpl 9,13,17,20 +msgid "Sign in with **%s**" +msgstr "Hasi saioa **%s**-ekin" + +# landing.tmpl 77 +msgid "Learn more..." +msgstr "Ikasi gehiago..." + +# landing.tmpl 114 +msgid "Registration is currently closed." +msgstr "Izen-ematea itxita dago une honetan." + +# landing.tmpl 115 +msgid "another instance" +msgstr "beste instantzia" + +# landing.tmpl 115 +msgid "You can always sign up on %s." +msgstr "Beti hasi ahal izango saioa %s batean." + +msgid "# Start your blog" +msgstr "# Hasi zure bloga" + +msgid "# Start your blog in the fediverse" +msgstr "# Hasi zure bloga fedibertsoan" + +msgid "" +"## Write More Socially\n" +"\n" +"WriteFreely can communicate with other federated platforms like _Mastodon_, " +"so people can follow your blogs, bookmark their favorite posts, and boost " +"them to their followers. Sign up above to create a blog and join the " +"fediverse." +msgstr "" +"## Idatzi sozialkiago\n" +"\n" +"WriteFreely _Mastodon_ bezalako beste edozein federatutako plataformarekin " +"komunika daiteke, beraz jendeak zure bloga jarraitu ahal izango du, gogoko " +"sarreren laster-markak egin, eta jarraitzaileekin elkarbanatu. Eman izena " +"blog bat sortzeko eta batu fedibertsora." + +msgid "About %s" +msgstr "%s-i buruz" + +msgid "_%s_ is a place for you to write and publish, powered by %s." +msgstr "_%s_ idatzi eta argitaratzeko gune bat da, %s erabiliz." + +msgid "" +"_%s_ is an interconnected place for you to write and publish, powered by %s." +msgstr "_%s_ idatzi eta argitaratzeko gune bat da, %s erabiliz." + +msgid "_%s_ is home to %d articles across %d blogs." +msgstr "_%s_ idatzi eta argitaratzeko gune bat da, %s erabiliz." + +msgid "" +"## About WriteFreely\n" +"\n" +"%s is a self-hosted, decentralized blogging platform for publishing " +"beautiful, simple blogs.\n" +"\n" +"It lets you publish a single blog, or host a community of writers who can " +"create multiple blogs under one account. You can also enable federation, " +"which allows people in the fediverse to follow your blog, bookmark your " +"posts, and share them with others." +msgstr "" +"## WriteFreely-ri buruz\n" +"\n" +"%s blog eder eta sinpleak argitaratzeko norberak ostata dezakeen eta " +"deszentralizaturikoa den blogintza plataforma bat da.\n" +"\n" +"Blog bakar bat argitaratzeko aukera eskaintzen du, edo kontu bakarrean " +"hainbat blog sor ditzakeen idazle komunitate bat ostatatzekoa. Federazioa " +"ere gaitu daiteke, horrela, bertako pertsonek blogak jarraitu, posten laster-" +"markak egin, eta besteekin partekatu ahal izango dituzte." + +msgid "Start an instance" +msgstr "Hasi instantzia bat" + +msgid "Privacy Policy" +msgstr "Pribatutasun Politika" + +msgid "Last updated" +msgstr "Azken eguneraketa" + +msgid "Read the latest posts form %s." +msgstr "Irakurri %s-en argitaratutako azken sarrerak." + +# : pages.go:98 +msgid "" +"%s, the software that powers this site, is built to enforce your right to " +"privacy by default.\n" +"\n" +"It retains as little data about you as possible, not even requiring an email " +"address to sign up. However, if you _do_ give us your email address, it is " +"stored encrypted in our database.\n" +"\n" +"We salt and hash your account's password.We store log files, or data about " +"what happens on our servers. We also use cookies to keep you logged in to " +"your account.\n" +"\n" +"Beyond this, it's important that you trust whoever runs %s. Software can " +"only do so much to protect you -- your level of privacy protections will " +"ultimately fall on the humans that run this particular service." +msgstr "" +"Gune hau ahalbidetzen duen softwareak, hau da, %s-k zure pribatutasun " +"eskubidea bermatzea lehenesten du.\n" +"\n" +"Instantzia honetan zuri buruzko ahalik eta datu gutxien gordetzen da, " +"erregistratzeko helbide elektronikorik ere ez da behar, baina ematen " +"badiguzu ere, enkriptaturik gordeko da gure datu-basean. Zure pasahitza " +"berriz salt eta hash bidez babesten da.\n" +"\n" +"Log fitxategiak ere gordetzen ditugu, gure zerbitzarietan gertatzen dena, " +"alegia. Zure kontuan saioa hasita izan dezazun cookieak ere erabiltzen " +"ditugu.\n" +"\n" +"Horrez gain, garrantzitsua da %s kudeatzen ari dena zure konfidantzazko " +"norbait izatea. Softwareak asko egin dezake zu babesteko, baina zure " +"pribatutasunaren babes-maila, azken batean, zerbitzu hau kudeatzen duten " +"pertsonena da." + +# static/js/postactions.js +msgid "Unpublished post" +msgstr "Argitaratu gabeko posta" + +msgid "Moved to %s" +msgstr "%s-(e)ra mugitua" + +msgid "move to" +msgstr "eraman" + +msgid "moving to %s..." +msgstr "%s-(e)ra mugitzen..." + +msgid "unable to move" +msgstr "ezinezkoa mugitzea" + +msgid "View on %s" +msgstr "Ikusi %s-(e)n" + +# classic.tmpl 64 +# pad.tmpl 59 +# bare.tmpl 30 +msgid "NOTE" +msgstr "OHARRA" + +# classic.tmpl 64 +# pad.tmpl 59 +# bare.tmpl 30 +msgid "for now, you'll need Javascript enabled to post." +msgstr "oraingoz, Javascript gaiturik behar duzu postak idazteko." + +# classic.tmpl 158 +# pad.tmpl 174 +msgid "Your account is silenced, so you can't publish or update posts." +msgstr "" +"Zure kontua isilarazi egin da, beraz ezin duzu postik argitaratu edo " +"eguneratu." + +# classic.tmpl 257 +# pad.tmpl 278 +msgid "Failed to post. Please try again." +msgstr "Huts argitaratzerakoan. Saia zaitez berriro." + +# classic.tmpl 163 +# pad.tmpl 179 +# bare.tmpl 99 +msgid "You don't have permission to update this post." +msgstr "Ez duzu baimenik post hau eguneratzeko." + +# pad.tmpl 16 +msgid "Write..." +msgstr "Idatzi..." + +# classic.tmpl 34 +# pad.tmpl 29 +msgid "Publish to..." +msgstr "Argitaratu..." + +# classic.tmpl 55 +# pad.tmpl 50 +msgid "Font" +msgstr "Letra-tipoa" + +# read.tmpl 105 +msgid "from" +msgstr "from" + +# read.tmpl 105 +msgid "Anonymous" +msgstr "Anonimoa" + +# read.tmpl 120 +msgid "Older" +msgstr "Zaharragoa" + +# read.tmpl 121 +msgid "Newer" +msgstr "Berriagoa" + +# password-collection.tmpl 31 +msgid "Menu" +msgstr "Menu" + +# password-collection.tmpl 51 +msgid "This blog requires a password." +msgstr "Blog honek pasahitza behar du." + +# 404-general.tmpl 1 +msgid "Page not found" +msgstr "Page not found" + +# 404-general.tmpl 4 +msgid "This page is missing." +msgstr "Orri hori falta da." + +# 404-general.tmpl 5 +msgid "Are you sure it was ever here?" +msgstr "Ziur al zaude hemen dagoela?" + +#404.tmpl 1,4 +msgid "Post not found" +msgstr "Ez da aurkitu posta" + +#404.tmpl +msgid "Why not share a thought of your own?" +msgstr "Zergatik ez partekatu norberaren pentsamenduak?" + +# 404.tmpl +msgid "Start a blog" +msgstr "Hasi blog bat" + +#404.tmpl +msgid "%s and spread your ideas on **%s**, %s." +msgstr "%s eta adierazi zure ideiak **%s** gunean, %s." + +# 404.tmpl +msgid "a simple blogging community" +msgstr "blogintza komunitate sinplea" + +# 404.tmpl +msgid "a simple, federated blogging community" +msgstr "federaturiko blogintza komunitate sinplea" + +# 410.tmpl 1 +msgid "Unpublished" +msgst "Argitaratu gabea" + +# 410.tmpl 4 +msgid "Post was unpublished by the author." +msgstr "Egileak posta ezabatu du." + +# 410.tmpl 5 +msgid "It might be back some day." +msgstr "Agian itzuliko da egunen batean." \ No newline at end of file diff --git a/page/page.go b/page/page.go index 5ab7750..aa23757 100644 --- a/page/page.go +++ b/page/page.go @@ -1,48 +1,51 @@ /* * Copyright © 2018-2019, 2021 Musing Studio LLC. * * This file is part of WriteFreely. * * WriteFreely is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, included * in the LICENSE file in this source code package. */ // package page provides mechanisms and data for generating a WriteFreely page. package page import ( "github.com/writefreely/writefreely/config" "strings" ) type StaticPage struct { // App configuration config.AppCfg Version string HeaderNav bool CustomCSS bool // Request values Path string Username string Values map[string]string Flashes []string CanViewReader bool IsAdmin bool CanInvite bool + + Locales string + Tr func (str string, ParamsToTranslate ...interface{}) interface{} } // SanitizeHost alters the StaticPage to contain a real hostname. This is // especially important for the Tor hidden service, as it can be served over // proxies, messing up the apparent hostname. func (sp *StaticPage) SanitizeHost(cfg *config.Config) { if cfg.Server.HiddenHost != "" && strings.HasPrefix(sp.Host, cfg.Server.HiddenHost) { sp.Host = cfg.Server.HiddenHost } } func (sp StaticPage) OfficialVersion() string { p := strings.Split(sp.Version, "-") return p[0] } diff --git a/pages/404-general.tmpl b/pages/404-general.tmpl index dfc4653..f954d3c 100644 --- a/pages/404-general.tmpl +++ b/pages/404-general.tmpl @@ -1,7 +1,7 @@ -{{define "head"}}Page not found — {{.SiteName}}{{end}} +{{define "head"}}{{call .Tr "Page not found"}} — {{.SiteName}}{{end}} {{define "content"}}
-

This page is missing.

-

Are you sure it was ever here?

+

{{call .Tr "This page is missing."}}

+

{{call .Tr "Are you sure it was ever here?"}}

{{end}} diff --git a/pages/404.tmpl b/pages/404.tmpl index b103e27..46337e0 100644 --- a/pages/404.tmpl +++ b/pages/404.tmpl @@ -1,10 +1,11 @@ -{{define "head"}}Post not found — {{.SiteName}}{{end}} +{{define "head"}}{{call .Tr "Post not found"}} — {{.SiteName}}{{end}} {{define "content"}}
-

Post not found.

+

{{call .Tr "Post not found"}}.

{{if and (not .SingleUser) .OpenRegistration}} -

Why not share a thought of your own?

-

Start a blog and spread your ideas on {{.SiteName}}, a simple{{if .Federation}}, federated{{end}} blogging community.

+

{{call .Tr "Why not share a thought of your own?"}}

+ {{$str := print "a simple blogging community"}}{{if .Federation}}{{$str = print "a simple, federated blogging community"}}{{end}} +

{{call .Tr "%s and spread your ideas on **%s**, %s." true (variables "Start a blog;/" .SiteName $str)}}

{{end}}
{{end}} diff --git a/pages/410.tmpl b/pages/410.tmpl index 5dfd4a4..1593a60 100644 --- a/pages/410.tmpl +++ b/pages/410.tmpl @@ -1,7 +1,7 @@ -{{define "head"}}Unpublished — {{.SiteName}}{{end}} +{{define "head"}}{{call .Tr "Unpublished"}} — {{.SiteName}}{{end}} {{define "content"}}
-

{{if .Content}}{{.Content}}{{else}}Post was unpublished by the author.{{end}}

-

It might be back some day.

+

{{if .Content}}{{.Content}}{{else}}{{call .Tr "Post was unpublished by the author."}}{{end}}

+

{{call .Tr "It might be back some day."}}

{{end}} diff --git a/pages/landing.tmpl b/pages/landing.tmpl index 2131b40..7ef914a 100644 --- a/pages/landing.tmpl +++ b/pages/landing.tmpl @@ -1,203 +1,206 @@ {{define "head"}} {{.SiteName}} {{end}} {{define "content"}}
{{ if .OpenRegistration }} {{template "oauth-buttons" .}} {{if not .DisablePasswordAuth}} {{if .Flashes}}
    {{range .Flashes}}
  • {{.}}
  • {{end}}
{{end}}
- +
{{end}} {{ else }} -

Registration is currently closed.

-

You can always sign up on another instance.

+

{{call .Tr "Registration is currently closed."}}

+

{{call .Tr "You can always sign up on %s." true (variables "another instance;https://writefreely.org/instances")}}

{{ end }}
{{if .Content}}
{{end}} {{ if .Content }}
{{.Content}}
{{ end }} {{end}} diff --git a/pages/login.tmpl b/pages/login.tmpl index f0a54eb..9d78a50 100644 --- a/pages/login.tmpl +++ b/pages/login.tmpl @@ -1,36 +1,37 @@ {{define "head"}}Log in — {{.SiteName}} {{end}} {{define "content"}}
-

Log in to {{.SiteName}}

+

{{call .Tr "Log in to %s" (variables .SiteName)}}

{{if .Flashes}}
    {{range .Flashes}}
  • {{.}}
  • {{end}}
{{end}} {{template "oauth-buttons" .}} {{if not .DisablePasswordAuth}}
-
-
+
+
{{if .To}}{{end}} - +
- {{if and (not .SingleUser) .OpenRegistration}}

{{if .Message}}{{.Message}}{{else}}No account yet? Sign up to start a blog.{{end}}

{{end}} + {{if and (not .SingleUser) .OpenRegistration}}

{{if .Message}}{{.Message}}{{else}}{{call .Tr "_No account yet?_ %s to start a blog." true (variables "Sign up; .SignupPath")}}{{end}}

{{end}} {{end}} {{end}} diff --git a/pages/privacy.tmpl b/pages/privacy.tmpl index 578472a..d893a99 100644 --- a/pages/privacy.tmpl +++ b/pages/privacy.tmpl @@ -1,10 +1,11 @@ {{define "head"}}{{.ContentTitle}} — {{.SiteName}} {{end}} {{define "content"}}

{{.ContentTitle}}

-

Last updated {{.Updated}}

+

{{call .Tr "Last updated"}},

{{.Content}}
+ {{end}} diff --git a/pages/signup-oauth.tmpl b/pages/signup-oauth.tmpl index fcd70d2..f16b7e6 100644 --- a/pages/signup-oauth.tmpl +++ b/pages/signup-oauth.tmpl @@ -1,186 +1,186 @@ {{define "head"}}Finish Creating Account — {{.SiteName}} {{end}} {{define "content"}}
-

Finish creating account

+

{{call .Tr "Finish creating account"}}

{{if .Flashes}}
    {{range .Flashes}}
  • {{.}}
  • {{end}}
{{end}}
{{if .InviteCode}}{{end}}
{{end}} diff --git a/pages/signup.tmpl b/pages/signup.tmpl index b1bb50d..ee9652a 100644 --- a/pages/signup.tmpl +++ b/pages/signup.tmpl @@ -1,180 +1,180 @@ {{define "head"}} Sign up — {{.SiteName}} {{end}} {{define "content"}}

Sign up

{{ if .Error }}

{{.Error}}

{{ else }} {{if .Flashes}}
    {{range .Flashes}}
  • {{.}}
  • {{end}}
{{end}}
{{template "oauth-buttons" .}} {{if not .DisablePasswordAuth}}
- +
{{end}}
{{ end }}
{{end}} diff --git a/static/js/localdate.js b/static/js/localdate.js index 879ebe4..57dfddd 100644 --- a/static/js/localdate.js +++ b/static/js/localdate.js @@ -1,16 +1,77 @@ -function toLocalDate(dateEl, displayEl) { +//localdate.js +//Modified for correctly formating the dates in Basque language(while some errors are fixed on "unicode-org/cldr" +// https://github.com/unicode-org/cldr/blob/main/common/main/eu.xml): 2022/08/16 + +function toLocalDate(dateEl, displayEl, longFormat) { var d = new Date(dateEl.getAttribute("datetime")); - displayEl.textContent = d.toLocaleDateString(navigator.language || "en-US", { year: 'numeric', month: 'long', day: 'numeric' }); + + //displayEl.textContent = d.toLocaleDateString(navigator.language || "en-US", { year: 'numeric', month: 'long', day: 'numeric' }); + if(longFormat){ + var dateString = d.toLocaleDateString(navigator.language || "en-US", { year: 'numeric', month: 'long', day: 'numeric' , hour: 'numeric', minute: 'numeric'}); + }else{ + var dateString = d.toLocaleDateString(navigator.language || "en-US", { year: 'numeric', month: 'long', day: 'numeric' }); + } + + function euFormat(data){ + var hk = [ + "urtarrila", "otsaila", "martxoa", + "apirila", "maiatza", "ekaina", "uztaila", + "abuztua", "iraila", "urria", + "azaroa", "abendua" + ]; + + var e = data.getDate(); + var h = data.getMonth(); + var u = data.getFullYear(); + var or = data.getHours(); + var min = data.getMinutes(); + var a = (or >= 12) ? "PM" : "AM"; + + var lot = ((((Number(u[2])%2 == 0 && u[3] =='1') || (Number(u[2])%2 == 1 && u[3]=='0')) || u[3] == '5')?'e':'')+'ko' + + if(longFormat){ + return u + lot + ' ' + hk[h] + 'k ' + e + ', ' + or + ':' + min + ' ' + a; + }else{ + return u + lot + ' ' + hk[h] + 'k ' + e; + } + + + } + + //if lang eu or eu-ES ... + displayEl.textContent = navigator.language.indexOf('eu') != -1 ? euFormat(d) : dateString + } // Adjust dates on individual post pages, and on posts in a list *with* an explicit title var $dates = document.querySelectorAll("article > time"); for (var i=0; i < $dates.length; i++) { toLocalDate($dates[i], $dates[i]); } // Adjust dates on posts in a list without an explicit title, where they act as the header $dates = document.querySelectorAll("h2.post-title > time"); for (i=0; i < $dates.length; i++) { - toLocalDate($dates[i], $dates[i].querySelector('a')); -} \ No newline at end of file + toLocalDate($dates[i], $dates[i].querySelector('a'), false); +} + +// Adjust dates on drafts 2022/08/16 +$dates = document.querySelectorAll("h4 > date"); +for (var i=0; i < $dates.length; i++) { + $dates[i].setAttribute("datetime", $dates[i].getAttribute("datetime").split(" +")[0]) + toLocalDate($dates[i], $dates[i], false); +} + +// Adjust date on privacy page 2022/08/17 +$dates = document.querySelectorAll("p > time"); +for (var i=0; i < $dates.length; i++) { + toLocalDate($dates[i], $dates[i], false); +} + +// Adjust date to long format on admin/user-s pages 2022/11/21 +if(location.pathname.startsWith("/admin/user")){ + $dates = document.querySelectorAll("td > time"); + for (var i=0; i < $dates.length; i++) { + toLocalDate($dates[i], $dates[i], true); + } +} diff --git a/static/js/postactions.js b/static/js/postactions.js index 74e3223..3d0c392 100644 --- a/static/js/postactions.js +++ b/static/js/postactions.js @@ -1,121 +1,141 @@ var postActions = function() { var $container = He.get('moving'); - var MultiMove = function(el, id, singleUser) { + + var tr = function(term, str){ + return term.replace("%s", str); + }; + var MultiMove = function(el, id, singleUser, loc) { var lbl = el.options[el.selectedIndex].textContent; + var loc = JSON.parse(loc); var collAlias = el.options[el.selectedIndex].value; var $lbl = He.$('label[for=move-'+id+']')[0]; - $lbl.textContent = "moving to "+lbl+"..."; + //$lbl.textContent = loc['moving to']+" "+lbl+"..."; + $lbl.textContent = tr(loc['moving to %s...'],lbl); + var params; if (collAlias == '|anonymous|') { params = [id]; } else { params = [{ id: id }]; } var callback = function(code, resp) { if (code == 200) { for (var i=0; i"; + //$lbl.innerHTML = loc["Moved to"]+" "+lbl+""; + $lbl.innerHTML = tr(loc["Moved to %s"], " "+lbl+""); var pre = "/"+collAlias; if (typeof singleUser !== 'undefined' && singleUser) { pre = ""; } var newPostURL = pre+"/"+resp.data[i].post.slug; try { // Posts page He.$('#post-'+resp.data[i].post.id+' > h3 > a')[0].href = newPostURL; } catch (e) { // Blog index var $article = He.get('post-'+resp.data[i].post.id); $article.className = 'norm moved'; if (collAlias == '|anonymous|') { var draftPre = ""; if (typeof singleUser !== 'undefined' && singleUser) { draftPre = "d/"; } - $article.innerHTML = '

Unpublished post.

'; + $article.innerHTML = '

'+loc["Unpublished post"]+'.

'; } else { - $article.innerHTML = '

Moved to '+lbl+'.

'; + //$article.innerHTML = '

'+loc["Moved to"]+' '+lbl+'.

'; + $article.innerHTML = '

'+ tr(loc["Moved to %s"], ''+lbl+'')+'.

'; } } } else { - $lbl.innerHTML = "unable to move: "+resp.data[i].error_msg; + $lbl.innerHTML = loc['unable to move']+": "+resp.data[i].error_msg; } } } }; if (collAlias == '|anonymous|') { He.postJSON("/api/posts/disperse", params, callback); } else { He.postJSON("/api/collections/"+collAlias+"/collect", params, callback); } }; - var Move = function(el, id, collAlias, singleUser) { + var Move = function(el, id, collAlias, singleUser, loc) { var lbl = el.textContent; + var loc = JSON.parse(loc) + + /* try { - var m = lbl.match(/move to (.*)/); + //var m = lbl.match(/move to (.*)/); + var m = lbl.match(RegExp(loc['move to'] + "(.*)")); lbl = m[1]; } catch (e) { if (collAlias == '|anonymous|') { lbl = "draft"; } } + */ + if (collAlias == '|anonymous|'){ + lbl = loc["draft"]; + }else{ + lbl = collAlias + } - el.textContent = "moving to "+lbl+"..."; + el.textContent = tr(loc['moving to %s...'],lbl); if (collAlias == '|anonymous|') { params = [id]; } else { params = [{ id: id }]; } var callback = function(code, resp) { if (code == 200) { for (var i=0; i"; + el.innerHTML = tr(loc["Moved to %s"], " "+lbl+""); el.onclick = null; var pre = "/"+collAlias; if (typeof singleUser !== 'undefined' && singleUser) { pre = ""; } var newPostURL = pre+"/"+resp.data[i].post.slug; el.href = newPostURL; - el.title = "View on "+lbl; + el.title = tr(loc["View on %s"], lbl) try { // Posts page He.$('#post-'+resp.data[i].post.id+' > h3 > a')[0].href = newPostURL; } catch (e) { // Blog index var $article = He.get('post-'+resp.data[i].post.id); $article.className = 'norm moved'; if (collAlias == '|anonymous|') { var draftPre = ""; if (typeof singleUser !== 'undefined' && singleUser) { draftPre = "d/"; } - $article.innerHTML = '

Unpublished post.

'; + $article.innerHTML = '

'+loc["Unpublished post"]+'.

'; } else { - $article.innerHTML = '

Moved to '+lbl+'.

'; + $article.innerHTML = '

'+ tr(loc["Moved to %s"], ''+lbl+'')+'.

'; } } } else { - el.innerHTML = "unable to move: "+resp.data[i].error_msg; + el.innerHTML = loc['unable to move']+": "+resp.data[i].error_msg; } } } } if (collAlias == '|anonymous|') { He.postJSON("/api/posts/disperse", params, callback); } else { He.postJSON("/api/collections/"+collAlias+"/collect", params, callback); } + }; return { move: Move, multiMove: MultiMove, }; }(); diff --git a/static/js/posts.js b/static/js/posts.js index dfc30b7..1f05310 100644 --- a/static/js/posts.js +++ b/static/js/posts.js @@ -1,332 +1,334 @@ /** * Functionality for managing local Write.as posts. * * Dependencies: * h.js */ + function toggleTheme() { var btns; try { btns = Array.prototype.slice.call(document.getElementById('belt').querySelectorAll('.tool img')); } catch (e) {} if (document.body.className == 'light') { document.body.className = 'dark'; try { for (var i=0; iMore...

'; return $more; }; var localPosts = function() { var $delPost, lastDelPost, lastInfoHTML; var $info = He.get('unsynced-posts-info'); var findPostIdx = function(id) { for (var i=0; i -1) { lastDelPost = posts.splice(i, 1)[0]; $delPost = H.getEl('post-'+id); $delPost.setClass('del-undo'); var $unsyncPosts = document.getElementById('unsynced-posts'); var visible = $unsyncPosts.children.length; for (var i=0; i < $unsyncPosts.children.length; i++) { // NOTE: *.children support in IE9+ if ($unsyncPosts.children[i].className.indexOf('del-undo') !== -1) { visible--; } } if (visible == 0) { H.getEl('unsynced-posts-header').hide(); // TODO: fix undo functionality and don't do the following: H.getEl('unsynced-posts-info').hide(); } H.set('posts', JSON.stringify(posts)); // TODO: fix undo functionality and re-add //lastInfoHTML = $info.innerHTML; //$info.innerHTML = 'Unsynced entry deleted. Undo.'; } }; var UndoDelete = function() { // TODO: fix this header reappearing H.getEl('unsynced-posts-header').show(); $delPost.removeClass('del-undo'); $info.innerHTML = lastInfoHTML; }; return { dismissError: DismissError, deletePost: DeletePostLocal, undoDelete: UndoDelete, }; }(); var movePostHTML = function(postID) { let $tmpl = document.getElementById('move-tmpl'); if ($tmpl === null) { return ""; } return $tmpl.innerHTML.replace(/POST_ID/g, postID); } var createPostEl = function(post, owned) { var $post = document.createElement('div'); let p = H.createPost(post.id, "", post.body) var title = (post.title || p.title || post.id); title = title.replace(/' + title + ''; var posted = ""; if (post.created) { posted = getFormattedDate(new Date(post.created)) } var hasDraft = H.exists('draft' + post.id); $post.innerHTML += '

' + posted + ' edit' + (hasDraft ? 'ed' : '') + ' delete '+movePostHTML(post.id)+'

'; if (post.error) { $post.innerHTML += '

Sync error: ' + post.error + '

'; } if (post.summary) { // TODO: switch to using p.summary, after ensuring it matches summary generated on the backend. $post.innerHTML += '

' + post.summary.replace(/'; } else if (post.body) { var preview; if (post.body.length > 140) { preview = post.body.substr(0, 140) + '...'; } else { preview = post.body; } $post.innerHTML += '

' + preview.replace(/'; } return $post; }; var loadPage = function(p, loadAll) { if (loadAll) { $posts.el.innerHTML = ''; } var startPost = posts.length - 1 - (loadAll ? 0 : ((p-1)*postsPerPage)); var endPost = posts.length - 1 - (p*postsPerPage); for (var i=startPost; i>=0 && i>endPost; i--) { $posts.el.appendChild(createPostEl(posts[i])); } if (loadAll) { if (p < pages) { $posts.el.appendChild(createMorePostsEl()); } } else { var $moreEl = document.getElementById('more-posts'); $moreEl.parentNode.removeChild($moreEl); } try { postsLoaded(posts.length); } catch (e) {} }; var getPageNum = function(url) { var hash; if (url) { hash = url.substr(url.indexOf('#')+1); } else { hash = window.location.hash.substr(1); } var page = hash || 1; page = parseInt(page); if (isNaN(page)) { page = 1; } return page; }; var postsPerPage = 10; var pages = 0; var page = getPageNum(); window.addEventListener('hashchange', function(e) { var newPage = getPageNum(); var didPageIncrement = newPage == getPageNum(e.oldURL) + 1; loadPage(newPage, !didPageIncrement); }); var deletePost = function(postID, token, callback) { deleting = true; var $delBtn = document.getElementById('post-' + postID).getElementsByClassName('delete action')[0]; $delBtn.innerHTML = '...'; var http = new XMLHttpRequest(); var url = "/api/posts/" + postID + (typeof token !== 'undefined' ? "?token=" + encodeURIComponent(token) : ''); http.open("DELETE", url, true); http.onreadystatechange = function() { if (http.readyState == 4) { deleting = false; if (http.status == 204 || http.status == 404) { for (var i=0; i'; }; if (posts.length == 0) { displayNoPosts(); } else { initialListPop(); } diff --git a/templates.go b/templates.go index ecd8750..f76ecb0 100644 --- a/templates.go +++ b/templates.go @@ -1,229 +1,258 @@ /* * Copyright © 2018-2021 Musing Studio LLC. * * This file is part of WriteFreely. * * WriteFreely is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, included * in the LICENSE file in this source code package. */ package writefreely import ( "errors" "html/template" "io" "io/ioutil" "net/http" "os" "path/filepath" "strings" "github.com/dustin/go-humanize" "github.com/writeas/web-core/l10n" "github.com/writeas/web-core/log" "github.com/writefreely/writefreely/config" + "github.com/leonelquinteros/gotext" ) var ( templates = map[string]*template.Template{} pages = map[string]*template.Template{} userPages = map[string]*template.Template{} funcMap = template.FuncMap{ "largeNumFmt": largeNumFmt, "pluralize": pluralize, "isRTL": isRTL, "isLTR": isLTR, "localstr": localStr, "localhtml": localHTML, "tolower": strings.ToLower, "title": strings.Title, "hasPrefix": strings.HasPrefix, "hasSuffix": strings.HasSuffix, "dict": dict, + + "localize": localize, + "variables": variables, } ) const ( templatesDir = "templates" pagesDir = "pages" ) func showUserPage(w http.ResponseWriter, name string, obj interface{}) { if obj == nil { log.Error("showUserPage: data is nil!") return } if err := userPages[filepath.Join("user", name+".tmpl")].ExecuteTemplate(w, name, obj); err != nil { log.Error("Error parsing %s: %v", name, err) } } func initTemplate(parentDir, name string) { if debugging { log.Info(" " + filepath.Join(parentDir, templatesDir, name+".tmpl")) } files := []string{ filepath.Join(parentDir, templatesDir, name+".tmpl"), filepath.Join(parentDir, templatesDir, "include", "footer.tmpl"), filepath.Join(parentDir, templatesDir, "base.tmpl"), filepath.Join(parentDir, templatesDir, "user", "include", "silenced.tmpl"), } if name == "collection" || name == "collection-tags" || name == "chorus-collection" || name == "read" { // These pages list out collection posts, so we also parse templatesDir + "include/posts.tmpl" files = append(files, filepath.Join(parentDir, templatesDir, "include", "posts.tmpl")) } if name == "chorus-collection" || name == "chorus-collection-post" { files = append(files, filepath.Join(parentDir, templatesDir, "user", "include", "header.tmpl")) } if name == "collection" || name == "collection-tags" || name == "collection-post" || name == "post" || name == "chorus-collection" || name == "chorus-collection-post" { files = append(files, filepath.Join(parentDir, templatesDir, "include", "post-render.tmpl")) } templates[name] = template.Must(template.New("").Funcs(funcMap).ParseFiles(files...)) } func initPage(parentDir, path, key string) { if debugging { log.Info(" [%s] %s", key, path) } files := []string{ path, filepath.Join(parentDir, templatesDir, "include", "footer.tmpl"), filepath.Join(parentDir, templatesDir, "base.tmpl"), filepath.Join(parentDir, templatesDir, "user", "include", "silenced.tmpl"), } if key == "login.tmpl" || key == "landing.tmpl" || key == "signup.tmpl" { files = append(files, filepath.Join(parentDir, templatesDir, "include", "oauth.tmpl")) } pages[key] = template.Must(template.New("").Funcs(funcMap).ParseFiles(files...)) } func initUserPage(parentDir, path, key string) { if debugging { log.Info(" [%s] %s", key, path) } userPages[key] = template.Must(template.New(key).Funcs(funcMap).ParseFiles( path, filepath.Join(parentDir, templatesDir, "user", "include", "header.tmpl"), filepath.Join(parentDir, templatesDir, "user", "include", "footer.tmpl"), filepath.Join(parentDir, templatesDir, "user", "include", "silenced.tmpl"), filepath.Join(parentDir, templatesDir, "user", "include", "nav.tmpl"), )) } // InitTemplates loads all template files from the configured parent dir. func InitTemplates(cfg *config.Config) error { log.Info("Loading templates...") tmplFiles, err := ioutil.ReadDir(filepath.Join(cfg.Server.TemplatesParentDir, templatesDir)) if err != nil { return err } for _, f := range tmplFiles { if !f.IsDir() && !strings.HasPrefix(f.Name(), ".") { parts := strings.Split(f.Name(), ".") key := parts[0] initTemplate(cfg.Server.TemplatesParentDir, key) } } log.Info("Loading pages...") // Initialize all static pages that use the base template filepath.Walk(filepath.Join(cfg.Server.PagesParentDir, pagesDir), func(path string, i os.FileInfo, err error) error { if !i.IsDir() && !strings.HasPrefix(i.Name(), ".") { key := i.Name() initPage(cfg.Server.PagesParentDir, path, key) } return nil }) log.Info("Loading user pages...") // Initialize all user pages that use base templates filepath.Walk(filepath.Join(cfg.Server.TemplatesParentDir, templatesDir, "user"), func(path string, f os.FileInfo, err error) error { if !f.IsDir() && !strings.HasPrefix(f.Name(), ".") { corePath := path if cfg.Server.TemplatesParentDir != "" { corePath = corePath[len(cfg.Server.TemplatesParentDir)+1:] } parts := strings.Split(corePath, string(filepath.Separator)) key := f.Name() if len(parts) > 2 { key = filepath.Join(parts[1], f.Name()) } initUserPage(cfg.Server.TemplatesParentDir, path, key) } return nil }) return nil } // renderPage retrieves the given template and renders it to the given io.Writer. // If something goes wrong, the error is logged and returned. func renderPage(w io.Writer, tmpl string, data interface{}) error { err := pages[tmpl].ExecuteTemplate(w, "base", data) if err != nil { log.Error("%v", err) } return err } func largeNumFmt(n int64) string { return humanize.Comma(n) } func pluralize(singular, plural string, n int64) string { if n == 1 { return singular } return plural } func isRTL(d string) bool { return d == "rtl" } func isLTR(d string) bool { return d == "ltr" || d == "auto" } - +/* func localStr(term, lang string) string { s := l10n.Strings(lang)[term] if s == "" { s = l10n.Strings("")[term] } return s } +*/ +func localStr(term, lang string) string { + switch lang { + case "eu": lang = "eu_ES" + case "es": lang = "es_ES" + default: lang = "en_UK" + } + setLang := localize(lang); + return setLang.Get(term) +} func localHTML(term, lang string) template.HTML { s := l10n.Strings(lang)[term] if s == "" { s = l10n.Strings("")[term] } s = strings.Replace(s, "write.as", "writefreely", 1) return template.HTML(s) } // from: https://stackoverflow.com/a/18276968/1549194 func dict(values ...interface{}) (map[string]interface{}, error) { if len(values)%2 != 0 { return nil, errors.New("dict: invalid number of parameters") } dict := make(map[string]interface{}, len(values)/2) for i := 0; i < len(values); i += 2 { key, ok := values[i].(string) if !ok { return nil, errors.New("dict: keys must be strings") } dict[key] = values[i+1] } return dict, nil } + +func localize(lang string) (*gotext.Locale){ + var language string = "en_UK" + if lang != "" { + language = lang + } + setLang := gotext.NewLocale("./locales", language); + setLang.AddDomain("base"); + return setLang +} + +func variables(Vars ...interface{}) interface{}{ + res := Vars + return res +} \ No newline at end of file diff --git a/templates/bare.tmpl b/templates/bare.tmpl index a5f9910..b940abe 100644 --- a/templates/bare.tmpl +++ b/templates/bare.tmpl @@ -1,266 +1,265 @@ {{define "pad"}} {{if .Editing}}Editing {{if .Post.Title}}{{.Post.Title}}{{else}}{{.Post.Id}}{{end}}{{else}}New Post{{end}} — {{.SiteName}} - {{if .CustomCSS}}{{end}}

- +
{{if not .SingleUser}}

{{if .Chorus}}{{else}}{{end}}{{.SiteName}}

{{end}}
- +
{{if .Editing}}{{end}} -
+
{{end}} diff --git a/templates/base.tmpl b/templates/base.tmpl index 273c2b9..94e1d6c 100644 --- a/templates/base.tmpl +++ b/templates/base.tmpl @@ -1,94 +1,94 @@ {{define "base"}} {{ template "head" . }} {{if .CustomCSS}}{{end}}
{{ if .Chorus }} {{end}}
{{ template "content" . }}
{{ template "footer" . }} {{if not .JSDisabled}} {{else}} {{if .WebFonts}}{{end}} {{end}} {{end}} {{define "body-attrs"}}{{end}} diff --git a/templates/chorus-collection-post.tmpl b/templates/chorus-collection-post.tmpl index 468455c..ed1478f 100644 --- a/templates/chorus-collection-post.tmpl +++ b/templates/chorus-collection-post.tmpl @@ -1,155 +1,154 @@ {{define "post"}} {{.PlainDisplayTitle}} {{localhtml "title dash" .Language.String}} {{.Collection.DisplayTitle}} - {{if .CustomCSS}}{{end}} {{if gt .Views 1}} {{end}} {{if gt (len .Images) 0}}{{else}}{{end}} {{range .Images}}{{else}}{{end}} {{template "collection-meta" .}} {{if .Collection.StyleSheet}}{{end}} {{if .Collection.RenderMathJax}} {{template "mathjax" . }} {{end}} {{template "highlighting" .}}
{{template "user-navigation" .}} {{if .Silenced}} - {{template "user-silenced"}} + {{template "user-silenced" (dict "Tr" $.Tr)}} {{end}}
{{if .IsScheduled}}

Scheduled

{{end}}{{if .Title.String}}

{{.FormattedDisplayTitle}}

{{end}}{{if and $.Collection.Format.ShowDates (not .IsPinned)}}{{end}}
{{.HTMLContent}}
{{ if .Collection.ShowFooterBranding }}

Published by {{ if .IsOwner }} · {{largeNumFmt .Views}} {{pluralize "view" "views" .Views}} · Edit {{if .IsPinned}} · Unpin{{end}} {{ end }}


{{ end }} {{if .Collection.CanShowScript}} {{range .Collection.ExternalScripts}}{{end}} {{if .Collection.Script}}{{end}} {{end}} {{if and .Monetization (not .IsOwner)}} {{end}} {{end}} diff --git a/templates/chorus-collection.tmpl b/templates/chorus-collection.tmpl index 2bc165d..35102e0 100644 --- a/templates/chorus-collection.tmpl +++ b/templates/chorus-collection.tmpl @@ -1,236 +1,240 @@ {{define "collection"}} {{.DisplayTitle}}{{if not .SingleUser}} — {{.SiteName}}{{end}} - {{if .CustomCSS}}{{end}} {{if gt .CurrentPage 1}}{{end}} {{if lt .CurrentPage .TotalPages}}{{end}} {{if not .IsPrivate}}{{end}} {{template "collection-meta" .}} {{if .StyleSheet}}{{end}} {{if .RenderMathJax}} {{template "mathjax" .}} {{end}} {{template "highlighting" . }} {{template "user-navigation" .}} {{if .Silenced}} - {{template "user-silenced"}} + {{template "user-silenced" (dict "Tr" $.Tr)}} {{end}}

{{.DisplayTitle}}

{{if .Description}}

{{.Description}}

{{end}} {{/*if not .Public/*}} {{/*end*/}} {{if .PinnedPosts}} {{end}}
{{if .Posts}}
{{else}}
{{end}} {{if .IsWelcome}}

Welcome, {{.Username}}!

This is your new blog.

Start writing, or customize your blog.

Check out our writing guide to see what else you can do, and get in touch anytime with questions or feedback.

{{end}} {{template "posts" .}} {{if gt .TotalPages 1}}{{end}} {{if .Posts}}
{{else}}
{{end}} {{if .ShowFooterBranding }} {{ end }} {{if .CanShowScript}} {{range .ExternalScripts}}{{end}} {{if .Script}}{{end}} {{end}} {{end}} diff --git a/templates/classic.tmpl b/templates/classic.tmpl index 7032f58..af30356 100644 --- a/templates/classic.tmpl +++ b/templates/classic.tmpl @@ -1,402 +1,405 @@ {{define "pad"}} - {{if .Editing}}Editing {{if .Post.Title}}{{.Post.Title}}{{else}}{{.Post.Id}}{{end}}{{else}}New Post{{end}} — {{.SiteName}} + {{if .Editing}}Editing {{if .Post.Title}}{{.Post.Title}}{{else}}{{.Post.Id}}{{end}}{{else}}{{call .Tr "New Post"}}{{end}} — {{.SiteName}} - {{if .CustomCSS}}{{end}}
{{if not .SingleUser}}

{{end}} - + {{ $N := 2 }}{{ if eq .AppCfg.Lang "eu_ES" }}{{ $N = 1}}{{ end }} +
- +
{{if .Editing}}{{end}}
{{end}} diff --git a/templates/collection-post.tmpl b/templates/collection-post.tmpl index 54d5298..dd45b9b 100644 --- a/templates/collection-post.tmpl +++ b/templates/collection-post.tmpl @@ -1,145 +1,144 @@ {{define "post"}} {{.PlainDisplayTitle}} {{localhtml "title dash" .Language.String}} {{.Collection.DisplayTitle}} - {{if .CustomCSS}}{{end}} {{ if .IsFound }} {{if gt .Views 1}} {{end}} {{if gt (len .Images) 0}}{{else}}{{end}} {{range .Images}}{{else}}{{end}} {{ end }} {{template "collection-meta" .}} {{if .Collection.StyleSheet}}{{end}} {{if .Collection.RenderMathJax}} {{template "mathjax" . }} {{end}} {{template "highlighting" .}}

{{if .Silenced}} - {{template "user-silenced"}} + {{template "user-silenced" (dict "Tr" $.Tr)}} {{end}} -
{{if .IsScheduled}}

Scheduled

{{end}}{{if .Title.String}}

{{.FormattedDisplayTitle}}

{{end}}{{if and $.Collection.Format.ShowDates (not .IsPinned) .IsFound}}{{end}}
{{.HTMLContent}}
+
{{if .IsScheduled}}

{{call .Tr "Scheduled"}}

{{end}}{{if .Title.String}}

{{.FormattedDisplayTitle}}

{{end}}{{if and $.Collection.Format.ShowDates (not .IsPinned) .IsFound}}{{end}}
{{.HTMLContent}}
{{ if .Collection.ShowFooterBranding }}

{{ end }} {{if .Collection.CanShowScript}} {{range .Collection.ExternalScripts}}{{end}} {{if .Collection.Script}}{{end}} {{end}} {{if and .Monetization (not .IsOwner)}} {{end}} {{end}} diff --git a/templates/collection-tags.tmpl b/templates/collection-tags.tmpl index 6a989a7..edbcc29 100644 --- a/templates/collection-tags.tmpl +++ b/templates/collection-tags.tmpl @@ -1,200 +1,203 @@ {{define "collection-tags"}} {{.Tag}} — {{.Collection.DisplayTitle}} - {{if .CustomCSS}}{{end}} {{if not .Collection.IsPrivate}}{{end}} {{if gt .Views 1}} {{end}} {{template "collection-meta" .}} {{if .Collection.StyleSheet}}{{end}} {{if .Collection.RenderMathJax}} {{template "mathjax" .}} {{end}} {{template "highlighting" . }}

{{.Collection.DisplayTitle}}

{{if .Silenced}} - {{template "user-silenced"}} + {{template "user-silenced" (dict "Tr" $.Tr)}} {{end}} {{if .Posts}}
{{else}}
{{end}}

{{.Tag}}

{{template "posts" .}} {{if .Posts}}
{{else}}
{{end}} {{ if .Collection.ShowFooterBranding }} {{ end }} {{if .CanShowScript}} {{range .ExternalScripts}}{{end}} {{if .Collection.Script}}{{end}} {{end}} {{if .IsOwner}} {{end}} {{end}} diff --git a/templates/collection.tmpl b/templates/collection.tmpl index db0591d..d27eb9e 100644 --- a/templates/collection.tmpl +++ b/templates/collection.tmpl @@ -1,252 +1,255 @@ {{define "collection"}} {{.DisplayTitle}}{{if not .SingleUser}} — {{.SiteName}}{{end}} - {{if .CustomCSS}}{{end}} {{if gt .CurrentPage 1}}{{end}} {{if lt .CurrentPage .TotalPages}}{{end}} {{if not .IsPrivate}}{{end}} {{template "collection-meta" .}} {{if .StyleSheet}}{{end}} {{if .RenderMathJax}} {{template "mathjax" .}} {{end}} {{template "highlighting" . }} {{if or .IsOwner .SingleUser}} {{else if .IsCollLoggedIn}} {{end}}
{{if .Silenced}} - {{template "user-silenced"}} + {{template "user-silenced" (dict "Tr" $.Tr)}} {{end}}

{{if .Posts}}{{else}}write.as {{end}}{{.DisplayTitle}}

{{if .Description}}

{{.Description}}

{{end}} {{/*if not .Public/*}} {{/*end*/}} {{if .PinnedPosts}} {{end}}
{{if .Posts}}
{{else}}
{{end}} {{if .IsWelcome}}

Welcome, {{.Username}}!

This is your new blog.

Start writing, or customize your blog.

Check out our writing guide to see what else you can do, and get in touch anytime with questions or feedback.

{{end}} {{template "posts" .}} {{if gt .TotalPages 1}}{{end}} {{if .Posts}}
{{else}}
{{end}} {{if .ShowFooterBranding }} {{ end }} {{if .CanShowScript}} {{range .ExternalScripts}}{{end}} {{if .Script}}{{end}} {{end}} {{end}} diff --git a/templates/edit-meta.tmpl b/templates/edit-meta.tmpl index d3f93a8..ef35c01 100644 --- a/templates/edit-meta.tmpl +++ b/templates/edit-meta.tmpl @@ -1,375 +1,375 @@ {{define "edit-meta"}} - Edit metadata: {{if .Post.Title}}{{.Post.Title}}{{else}}{{.Post.Id}}{{end}} — {{.SiteName}} + {{call .Tr "Edit metadata"}}: {{if .Post.Title}}{{.Post.Title}}{{else}}{{.Post.Id}}{{end}} — {{.SiteName}} {{if .CustomCSS}}{{end}}
-

+

-
-
-
+
+
+
-

Edit metadata: {{if .Post.Title}}{{.Post.Title}}{{else}}{{.Post.Id}}{{end}} view post

+

{{call .Tr "Edit metadata"}}: {{if .Post.Title}}{{.Post.Title}}{{else}}{{.Post.Id}}{{end}} {{call .Tr "View post"}}

{{if .Flashes}}
    {{range .Flashes}}
  • {{.}}
  • {{end}}
{{end}}
{{if .EditCollection}} -
+
{{end}} -
+
-
-
-
+
+
+
- UTC now + UTC {{call .Tr "now"}}

Date format should be: YYYY-MM-DD HH:MM:SS

-
 
+
 
{{end}} diff --git a/templates/include/footer.tmpl b/templates/include/footer.tmpl index c6f4b87..d0b6ead 100644 --- a/templates/include/footer.tmpl +++ b/templates/include/footer.tmpl @@ -1,44 +1,44 @@ {{define "footer"}}
{{if or .SingleUser .WFModesty}} {{else}}

{{.SiteName}}

{{end}} {{end}} diff --git a/templates/include/oauth.tmpl b/templates/include/oauth.tmpl index 9a8d05e..a7d9d48 100644 --- a/templates/include/oauth.tmpl +++ b/templates/include/oauth.tmpl @@ -1,37 +1,31 @@ {{define "oauth-buttons"}} {{ if or .SlackEnabled .WriteAsEnabled .GitLabEnabled .GiteaEnabled .GenericEnabled }}
{{ if .SlackEnabled }} Sign in with Slack {{ end }} {{ if .WriteAsEnabled }} - - Sign in with Write.as - + {{call .Tr "Sign in with **%s**" true (variables "Write.as")}} {{ end }} {{ if .GitLabEnabled }} - - Sign in with {{.GitLabDisplayName}} - + {{call .Tr "Sign in with **%s**" true (variables .GitLabDisplayName)}} {{ end }} {{ if .GiteaEnabled }} - - - Sign in with {{.GiteaDisplayName}} - + GitLabDisplayName + {{call .Tr "Sign in with **%s**" true (variables .GiteaDisplayName)}} {{ end }} {{ if .GenericEnabled }} - Sign in with {{.GenericDisplayName}} + {{call .Tr "Sign in with **%s**" true (variables .GenericDisplayName)}} {{ end }}
{{if not .DisablePasswordAuth}}
-

or

+

{{call .Tr "or"}}


{{end}} {{ end }} {{end}} \ No newline at end of file diff --git a/templates/include/posts.tmpl b/templates/include/posts.tmpl index c3401fa..9aff2ad 100644 --- a/templates/include/posts.tmpl +++ b/templates/include/posts.tmpl @@ -1,64 +1,69 @@ {{ define "posts" }} + {{ range $el := .Posts }}
- {{if .IsScheduled}}

Scheduled

{{end}} + {{if .IsScheduled}}

{{call $.Tr "Scheduled"}}

{{end}} {{if .Title.String}}

{{- if .HasTitleLink -}} - {{.HTMLTitle}} + {{.HTMLTitle}} {{- else -}} {{- if .IsPaid}}{{template "paid-badge" .}}{{end -}} {{- end}} {{if $.IsOwner}} - - {{if $.CanPin}}{{end}} - + + {{if $.CanPin}}{{end}} + {{if gt (len $.Collections) 1}}{{else}} {{range $.Collections}} - + {{end}} {{end}} {{end}}

{{if $.Format.ShowDates}}{{end}} {{else}}

{{if $.Format.ShowDates -}} {{- if .IsPaid}}{{template "paid-badge" .}}{{end -}} {{- end}} {{if $.IsOwner}} - {{if not $.Format.ShowDates}}{{end}} - - {{if $.CanPin}}{{end}} - + {{if not $.Format.ShowDates}}{{end}} + + {{if $.CanPin}}{{end}} + {{if gt (len $.Collections) 1}}{{else}} {{range $.Collections}} - + {{end}} {{end}} {{end}}

{{end}} -{{if .Excerpt}}
{{if and (and (not $.IsOwner) (not $.Format.ShowDates)) (not .Title.String)}}{{end}}{{.Excerpt}}
+{{if .Excerpt}}
{{if and (and (not $.IsOwner) (not $.Format.ShowDates)) (not .Title.String)}}{{end}}{{.Excerpt}}
-{{localstr "Read more..." .Language.String}}{{else}}
{{if and (and (not $.IsOwner) (not $.Format.ShowDates)) (not .Title.String)}}{{end}}{{.HTMLContent}}
{{end}}
{{ end }} +{{localstr "Read more..." .Language.String}}{{else}}
{{if and (and (not $.IsOwner) (not $.Format.ShowDates)) (not .Title.String)}}{{end}}{{.HTMLContent}}
{{end}}{{ end }} {{ end }} {{define "paid-badge"}} {{end}} \ No newline at end of file diff --git a/templates/pad.tmpl b/templates/pad.tmpl index 555bbb3..0601f1b 100644 --- a/templates/pad.tmpl +++ b/templates/pad.tmpl @@ -1,421 +1,426 @@ {{define "pad"}} - {{if .Editing}}Editing {{if .Post.Title}}{{.Post.Title}}{{else}}{{.Post.Id}}{{end}}{{else}}New Post{{end}} — {{.SiteName}} + {{if .Editing}}Editing {{if .Post.Title}}{{.Post.Title}}{{else}}{{.Post.Id}}{{end}}{{else}}{{call .Tr "New Post"}}{{end}} — {{.SiteName}} {{if .CustomCSS}}{{end}}
- - +
- {{if not .SingleUser}}

{{end}} + {{if not .SingleUser}}

{{end}} - + {{ $N := 2 }}{{ if eq .AppCfg.Lang "eu_ES" }}{{ $N = 1}}{{ end }} +
- +
- {{if .Editing}}{{end}} - -
-
+ {{if .Editing}}{{end}} + +
+
{{end}} diff --git a/templates/password-collection.tmpl b/templates/password-collection.tmpl index fde4edc..3a90e03 100644 --- a/templates/password-collection.tmpl +++ b/templates/password-collection.tmpl @@ -1,88 +1,87 @@ {{define "password-collection"}} {{.DisplayTitle}}{{if not .SingleUser}} — {{.SiteName}}{{end}} - {{if .CustomCSS}}{{end}} {{if .StyleSheet}}{{end}} {{if .SingleUser}} {{end}}

{{.DisplayTitle}}

{{if .Flashes}}
    {{range .Flashes}}
  • {{.}}
  • {{end}}
{{else}} -

This blog requires a password.

+

{{call .Tr "This blog requires a password."}}

{{end}}

{{if and .Script .CanShowScript}}{{end}} {{end}} diff --git a/templates/post.tmpl b/templates/post.tmpl index 9398425..e9e9efc 100644 --- a/templates/post.tmpl +++ b/templates/post.tmpl @@ -1,102 +1,101 @@ {{define "post"}} {{if .Title}}{{.Title}}{{else}}{{.GenTitle}}{{end}} {{localhtml "title dash" .Language}} {{.SiteName}} {{if .IsCode}} {{end}} - {{if .CustomCSS}}{{end}} {{if gt .Views 1}} {{end}} {{if gt (len .Images) 0}}{{else}}{{end}} {{range .Images}}{{else}}{{end}} {{if .Author}}{{end}} {{template "highlighting" .}}

{{.SiteName}}

{{if .Silenced}} - {{template "user-silenced"}} + {{template "user-silenced" (dict "Tr" $.Tr)}} {{end}}
{{if .Title}}

{{.Title}}

{{end}}{{ if .IsPlainText }}

{{.Content}}

{{ else }}
{{.HTMLContent}}
{{ end }}

{{if .IsCode}} {{else}} {{if .IsPlainText}}{{end}} {{end}} {{end}} diff --git a/templates/read.tmpl b/templates/read.tmpl index c032970..3885c1b 100644 --- a/templates/read.tmpl +++ b/templates/read.tmpl @@ -1,142 +1,142 @@ {{define "head"}}{{.SiteName}} Reader {{if gt .CurrentPage 1}}{{end}} {{if lt .CurrentPage .TotalPages}}{{end}} {{end}} {{define "body-attrs"}}id="collection"{{end}} {{define "content"}}

{{.ContentTitle}}

{{if .SelTopic}}#{{.SelTopic}} posts{{else}}{{.Content}}{{end}}

{{ if gt (len .Posts) 0 }}
{{range .Posts}}
{{if .Title.String -}}

{{- if .IsPaid}}{{template "paid-badge" .}}{{end -}}

{{- else -}}

{{- if .IsPaid}}{{template "paid-badge" .}}{{end -}}

{{- end}} -

{{if .Collection}}from {{.Collection.DisplayTitle}}{{else}}Anonymous{{end}}

+

{{if .Collection}}{{call $.Tr "from"}} {{.Collection.DisplayTitle}}{{else}}{{call $.Tr "Anonymous"}}{{end}}

{{if .Excerpt}}
{{.Excerpt}}
{{localstr "Read more..." .Language.String}}{{else}}
{{ if not .HTMLContent }}

{{.Content}}

{{ else }}{{.HTMLContent}}{{ end }}
 
{{localstr "Read more..." .Language.String}}{{end}}
{{end}}
{{ else }}

No posts here yet!

{{ end }} {{if gt .TotalPages 1}}{{end}}
{{end}} diff --git a/templates/user/admin.tmpl b/templates/user/admin.tmpl index 1a0e6b4..a5b52b3 100644 --- a/templates/user/admin.tmpl +++ b/templates/user/admin.tmpl @@ -1,68 +1,72 @@ {{define "admin"}} {{template "header" .}}
{{template "admin-header" .}} {{if .Message}}

{{.Message}}

{{end}}
-
{{largeNumFmt .UsersCount}} {{pluralize "user" "users" .UsersCount}}
-
{{largeNumFmt .CollectionsCount}} {{pluralize "blog" "blogs" .CollectionsCount}}
-
{{largeNumFmt .PostsCount}} {{pluralize "post" "posts" .PostsCount}}
+ {{ $N := .UsersCount }}{{ if eq .AppCfg.Lang "eu_ES" }}{{ $N = 1}}{{ end }} + {{ $C := .CollectionsCount }}{{ if eq .AppCfg.Lang "eu_ES" }}{{ $C = 1}}{{ end }} + {{ $P := .PostsCount }}{{ if eq .AppCfg.Lang "eu_ES" }}{{ $P = 1}}{{ end }} +
{{largeNumFmt .UsersCount}} {{call .Tr "User" $N}}
+
{{largeNumFmt .CollectionsCount}} {{call .Tr "Blog" $C}}
+
{{largeNumFmt .PostsCount}} {{call .Tr "post" $P}}
{{template "footer" .}} {{template "body-end" .}} {{end}} diff --git a/templates/user/admin/app-settings.tmpl b/templates/user/admin/app-settings.tmpl index 50c50ec..7c4ec7f 100644 --- a/templates/user/admin/app-settings.tmpl +++ b/templates/user/admin/app-settings.tmpl @@ -1,176 +1,176 @@ {{define "app-settings"}} {{template "header" .}}
{{template "admin-header" .}} {{if .Message}}

{{.Message}}

{{end}} {{if .ConfigMessage}}

{{.ConfigMessage}}

{{end}}